summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend/backend.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-07-24 15:19:02 -0300
committerTomás Touceda <chiiph@leap.se>2014-07-24 15:19:02 -0300
commitfaadf8dc3bb1e49adc23c64d5a851b7eea0ce2ee (patch)
treed1da9b438db9e1c6a2513704ac40bf1132de2223 /src/leap/bitmask/backend/backend.py
parente7de22a844cef0067946a2af4ec464314cf37e0d (diff)
parentd97a9804c1a6fb06d7ce39066f92a0259a6ab8c3 (diff)
Merge remote-tracking branch 'refs/remotes/ivan/feature/add-backend-alive-check' into develop
Diffstat (limited to 'src/leap/bitmask/backend/backend.py')
-rw-r--r--src/leap/bitmask/backend/backend.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/bitmask/backend/backend.py b/src/leap/bitmask/backend/backend.py
index 833f4368..c895f8f5 100644
--- a/src/leap/bitmask/backend/backend.py
+++ b/src/leap/bitmask/backend/backend.py
@@ -23,7 +23,7 @@ from twisted.internet import defer, reactor, threads
import zmq
from zmq.auth.thread import ThreadAuthenticator
-from leap.bitmask.backend.api import API
+from leap.bitmask.backend.api import API, PING_REQUEST
from leap.bitmask.backend.utils import get_backend_certificates
from leap.bitmask.backend.signaler import Signaler
@@ -146,6 +146,10 @@ class Backend(object):
:param request_json: a json specification of a request.
:type request_json: str
"""
+ if request_json == PING_REQUEST:
+ # do not process request if it's just a ping
+ return
+
try:
# request = zmq.utils.jsonapi.loads(request_json)
# We use stdlib's json to ensure that we get unicode strings