Permalink
Browse files

Merge pull request #35 from Doerge/socketclose_fix

Wrap socket#close in its own try-except
  • Loading branch information...
2 parents 484e2e9 + fc89b8a commit e6697a00a674b1b4b7bbbc06a5032d20355059f4 @earl committed Jul 31, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 beanstalkc.py
View
3 beanstalkc.py 100644 → 100755
@@ -70,6 +70,9 @@ def close(self):
"""Close connection to server."""
try:
self._socket.sendall('quit\r\n')
+ except socket.error:
+ pass
+ try:
self._socket.close()
except socket.error:
pass

0 comments on commit e6697a0

Please sign in to comment.