Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added reconnect utility method

  • Loading branch information...
commit 3139c8899fff1451459964fd98fe0043681f8ac6 1 parent 94d470c
Jeremy Carroll phobos182 authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 beanstalkc.py
5 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()
Please sign in to comment.
Something went wrong with that request. Please try again.