# HG changeset patch # User Charly COSTE # Date 1263463693 -3600 # Node ID e1e66c563d08302965df465c417ce6ccb4ce5866 # Parent db3f648a9e9e65b4d1e40a0a30a9b74dd1afa347 minor fixes in irclib Signed-off-by: Charly COSTE diff --git a/irclib.py b/irclib.py --- a/irclib.py +++ b/irclib.py @@ -532,8 +532,8 @@ class ServerConnection(Connection): been called, the object is unusable. """ - self.disconnect(message, volontary) self.irclibobj._remove_connection(self) + self.disconnect(message=message, volontary=volontary) def _get_socket(self): """[Internal]""" @@ -566,8 +566,10 @@ class ServerConnection(Connection): try: if self.ssl: new_data = self.ssl.read(2**14) + elif self.socket: + new_data = self.socket.recv(2**14) else: - new_data = self.socket.recv(2**14) + return except socket.error, x: # The server hung up. self.disconnect("Connection reset by peer")