Permalink
Browse files

Merge branch 'master' of https://github.com/phobos182/beanstalkc

Pull reconnect addition from Jeremy Carroll. Closes #23.
  • Loading branch information...
2 parents 94d470c + 3139c88 commit 5bb96fde7fc6101a12b2eb91bc53bb813d10b210 @earl committed Oct 26, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 beanstalkc.py
View
@@ -74,6 +74,11 @@ def close(self):
except socket.error:
pass
+ def reconnect(self):
+ """Re-connect to server."""
+ self.close()
+ self.connect()
+
def _interact(self, command, expected_ok, expected_err=[]):
SocketError.wrap(self._socket.sendall, command)
status, results = self._read_response()

0 comments on commit 5bb96fd

Please sign in to comment.