summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/api.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-07-21 17:03:47 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-07-21 17:11:33 -0300
commit68b1be8ef443b088cf5c1f7f964e1bd7ad42408e (patch)
treeec882e6c61f1fe4a04ba9eca113c198f998f084f /src/leap/bitmask/backend/api.py
parent159dbe295148975bdfe9a50f871254aa9adf2328 (diff)
Add heartbeat to check if backend is alive.
Send a 'ping' request every 2 secs to ensure that the backend is running. Use polling instead of recv on the backend_proxy. This was already implemented for the signaler.
Diffstat (limited to 'src/leap/bitmask/backend/api.py')
-rw-r--r--src/leap/bitmask/backend/api.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/leap/bitmask/backend/api.py b/src/leap/bitmask/backend/api.py
index b8533f36..4f52e470 100644
--- a/src/leap/bitmask/backend/api.py
+++ b/src/leap/bitmask/backend/api.py
@@ -18,10 +18,12 @@
Backend available API and SIGNALS definition.
"""
STOP_REQUEST = "stop"
+PING_REQUEST = "PING"
API = (
STOP_REQUEST, # this method needs to be defined in order to support the
# backend stop action
+ PING_REQUEST,
"eip_can_start",
"eip_cancel_setup",