Skip to content
This repository
Browse code

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

Pull reconnect addition from Jeremy Carroll. Closes #23.
  • Loading branch information...
commit 5bb96fde7fc6101a12b2eb91bc53bb813d10b210 2 parents 94d470c + 3139c88
Andreas Bolka authored

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 beanstalkc.py
5 beanstalkc.py
@@ -74,6 +74,11 @@ def close(self):
74 74 except socket.error:
75 75 pass
76 76
  77 + def reconnect(self):
  78 + """Re-connect to server."""
  79 + self.close()
  80 + self.connect()
  81 +
77 82 def _interact(self, command, expected_ok, expected_err=[]):
78 83 SocketError.wrap(self._socket.sendall, command)
79 84 status, results = self._read_response()

0 comments on commit 5bb96fd

Please sign in to comment.
Something went wrong with that request. Please try again.