Mercurial > xib
changeset 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 | db3f648a9e9e |
children | b13ca9cefe1c |
files | irclib.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
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")