Permalink
Browse files

slight modification

  • Loading branch information...
1 parent 8bee6d7 commit 1fe83044479bbb562ce33943b6f0de880b5bfa28 @bufferx bufferx committed Jan 10, 2014
Showing with 5 additions and 4 deletions.
  1. +5 −4 stormed/connection.py
View
@@ -131,13 +131,14 @@ def _add_ioloop_callback(self, callback):
self.io_loop._callbacks.add(callback)
def close_stream(self):
- self.status = status.CLOSED
-
if self.stream is None:
return
- self.stream.close()
- self.stream = None
+ try:
+ self.stream.close()
+ finally:
+ self.status = status.CLOSED
+ self.stream = None
def on_closed_stream(self):
if self.status != status.CLOSED:

0 comments on commit 1fe8304

Please sign in to comment.