Skip to content

Commit

Permalink
Fix #15 - swallow 10057 error on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
majek committed May 9, 2012
1 parent 34598ab commit 951e32f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion puka/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,18 @@ def wait(self, promise_numbers, timeout=None, raise_errors=True):
# may as well return soon, and the user has no way to figure
# out if the write buffer was flushed or not - (ie: did the
# wait run select() or not)
self.on_write()
#
# This is problem is especially painful with regard to
# async messages, like basic_ack. See #3.
#
# Additionally, during the first round trip on windows - when
# the connection is being established, the socket may not yet
# be in the connected state - swallow an error in that case.
try:
self.on_write()
except socket.error, e:
if e.errno != 10057:
raise

while True:
while True:
Expand Down

0 comments on commit 951e32f

Please sign in to comment.