Mercurial > xib
diff irclib.py @ 128:e1e66c563d08
minor fixes in irclib
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Thu, 14 Jan 2010 11:08:13 +0100 |
parents | efdc038e757a |
children | 46af7f2744a9 |
line wrap: on
line diff
--- 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")