Skip to content

Commit

Permalink
bugfix in websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
fiorix committed Jun 16, 2012
1 parent 02a4e64 commit a16c1b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cyclone/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def _execute(self, transforms, *args, **kwargs):
except:
return self.forbidConnection("Expected WebSocket Headers")

self._connectionMade = functools.partial(self.connectionMade,
*args, **kwargs)

if "Sec-Websocket-Version" in self.request.headers and \
self.request.headers['Sec-Websocket-Version'] in ('7', '8', '13'):
self.ws_protocol = WebSocketProtocol17(self)
Expand All @@ -85,8 +88,6 @@ def _execute(self, transforms, *args, **kwargs):
self.request.connection.rawDataReceived = \
self.ws_protocol.rawDataReceived
self.ws_protocol.acceptConnection()
self._connectionMade = functools.partial(self.connectionMade,
*args, **kwargs)

def forbidConnection(self, message):
self.transport.write(
Expand Down

0 comments on commit a16c1b7

Please sign in to comment.