diff options
author | Martin <martin@leo.fri1.uni-lj.si> | 2015-09-15 12:14:30 +0200 |
---|---|---|
committer | Martin <martin@leo.fri1.uni-lj.si> | 2015-09-15 12:14:30 +0200 |
commit | 9df933ebc3ade50628a26af691693254ed1daa22 (patch) | |
tree | 26fa4689f581eda562fcfd881ea3c9cca7b4ecc5 /server/socket.py | |
parent | b2b4e40e5333b3182d0a57052640e8a7ecae8619 (diff) | |
parent | cc3a807157d6d2d2c4830afcec90d6614e486b70 (diff) |
Merge branch 'master' of ssh://212.235.189.51:22122/codeq-server
Diffstat (limited to 'server/socket.py')
-rw-r--r-- | server/socket.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/socket.py b/server/socket.py index c248056..b184d4b 100644 --- a/server/socket.py +++ b/server/socket.py @@ -20,8 +20,10 @@ _transactions_to_socket = {} # keyed by tid, used only when there is no sid ava def processIncomingPacket(receiving_socket, packet): print('Decocoding JSON: {}'.format(packet)) obj = json.loads(packet) - if obj.get('type') == 'connect': + req_type = obj.get('type') # private (meta) requests have the 'type' + if req_type == 'connect': return # TODO: first packet is 'connect', providing the list of connected sessions to the peer + tid = obj.get('tid') # transaction ID if tid is None: raise Exception('Transaction ID is missing from the request') @@ -270,7 +272,7 @@ class Communication(SocketHandler): lock.release() for handler in handlers: handler.destroy() # destroy them all, even the server socket - # this is where everything is destroyed but us, so what follows is self-destruct + # this is where everything has been destroyed but us, so what follows is self-destruct lock.acquire() try: self._destroying = True |