From 61ae66c2643650bb618a93b7b20e62543276ab91 Mon Sep 17 00:00:00 2001 From: Mathieu Leduc-Hamel Date: Tue, 24 Feb 2015 16:01:53 -0500 Subject: [PATCH] fixed socket assignation --- pyramid_socketio/gunicorn/workers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyramid_socketio/gunicorn/workers.py b/pyramid_socketio/gunicorn/workers.py index da8dedf..c3c59d3 100644 --- a/pyramid_socketio/gunicorn/workers.py +++ b/pyramid_socketio/gunicorn/workers.py @@ -8,6 +8,11 @@ from socketio.handler import SocketIOHandler class GeventSocketIOBaseWorker(GeventPyWSGIWorker): + @property + def socket(self): + if self.sockets: + return self.sockets[0] + def run(self): self.socket.setblocking(1) pool = Pool(self.worker_connections)