summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/hs-clientmanager.cpp4
-rw-r--r--src/hs-clientmanager.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/hs-clientmanager.cpp b/src/hs-clientmanager.cpp
index 9b62808..7c2adc5 100644
--- a/src/hs-clientmanager.cpp
+++ b/src/hs-clientmanager.cpp
@@ -95,6 +95,8 @@ HS_ClientCtxt* HS_ClientManager::createClientCtxt(afb_req_t req, std::string app
afb_req_session_set_LOA(req, 1);
afb_req_context_set(req, ctxt, cbRemoveClientCtxt);
}
+
+ appid2ctxt[appid] = ctxt;
return ctxt;
}
@@ -186,7 +188,7 @@ int HS_ClientManager::handleRequest(afb_req_t request, const char *verb, const c
}
else {
if(!strcasecmp(verb, "subscribe")) {
- appid2ctxt[id] = createClientCtxt(request, id);
+ createClientCtxt(request, id);
HS_Client* client = addClient(request, id);
ret = client->handleRequest(request, "subscribe");
}
diff --git a/src/hs-clientmanager.h b/src/hs-clientmanager.h
index 7ca6411..96a15b9 100644
--- a/src/hs-clientmanager.h
+++ b/src/hs-clientmanager.h
@@ -49,7 +49,6 @@ public:
int pushEvent(const char *event, struct json_object *param, std::string appid = "");
void removeClientCtxt(void *data); // don't use, internal only
-private:
HS_ClientCtxt* createClientCtxt(afb_req_t req, std::string appid);
HS_Client* addClient(afb_req_t req, std::string appid);
void removeClient(std::string appid);