Permalink
Browse files

small fix to previous commit

  • Loading branch information...
1 parent 75c403f commit 29f5b96519f9a83db0ab2894c410cb8d4aa8ddaa @paolo-losi committed Jan 11, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 stormed/connection.py
View
3 stormed/connection.py
@@ -45,12 +45,13 @@ def connect(self, callback):
self.on_connect = callback
if TORNADO_1_2:
self.stream = IOStream(sock, io_loop=self.io_loop)
+ self.stream.set_close_callback(self.on_closed_stream)
self.stream.connect((self.host, self.port), self._handshake)
else:
sock.connect((self.host, self.port))
self.stream = IOStream(sock, io_loop=self.io_loop)
+ self.stream.set_close_callback(self.on_closed_stream)
self._handshake()
- self.stream.set_close_callback(self.on_closed_stream)
def close(self, callback=None):
if self.status != status.CLOSING:

0 comments on commit 29f5b96

Please sign in to comment.