aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hs-client.cpp')
-rw-r--r--src/hs-client.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hs-client.cpp b/src/hs-client.cpp
index 26e43bb..536ff6e 100644
--- a/src/hs-client.cpp
+++ b/src/hs-client.cpp
@@ -142,7 +142,12 @@ int HS_Client::subscribe(afb_req_t request, const char* event)
auto ip = event_list.find(std::string(event));
if(ip == event_list.end()) {
event_list[std::string(event)] = 0;
+ }
+ if(!subscription) {
ret = afb_req_subscribe(request, my_event);
+ if(ret == 0) {
+ subscription = true;
+ }
}
return ret;
}