Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Commit

Permalink
rename reconnect to maybe_reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Oct 9, 2012
1 parent 094a49d commit 278972b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gearman/connection.py
Expand Up @@ -195,7 +195,7 @@ def send_commands_to_buffer(self):

self._outgoing_buffer = ''.join(packed_data)

def reconnect(self):
def maybe_reconnect(self):
"""If we don't have outgoing data waiting after a length of time, close the current connection and open a new one."""
if self.connect_time < time.time() - self.reconnect_timeout:
if not self._outgoing_buffer:
Expand Down
2 changes: 1 addition & 1 deletion gearman/connection_manager.py
Expand Up @@ -92,7 +92,7 @@ def establish_connection(self, current_connection):
assert current_connection in self.connection_list, "Unknown connection - %r" % current_connection

if current_connection.connected:
current_connection.reconnect()
current_connection.maybe_reconnect()
return current_connection

# !NOTE! May throw a ConnectionError
Expand Down

0 comments on commit 278972b

Please sign in to comment.