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)