From 64073d4c7efb2f21f66d0fea5083c659a1b0a15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Tue, 15 Sep 2015 10:46:10 +0200 Subject: Augmented the readme with apache directives for proxying websocket directives. --- server/socket.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/socket.py') 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 -- cgit v1.2.1