From 5588f7c42e76fc4ec72870bc38cc65333ac578cb Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 19 May 2008 15:25:49 +0200 Subject: don't die on failed handshake --- skype/skyped.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/skype/skyped.py b/skype/skyped.py index d53d02a7..605b653b 100644 --- a/skype/skyped.py +++ b/skype/skyped.py @@ -98,7 +98,11 @@ def listener(sock, *args): global options options.conn, addr = sock.accept() if hasattr(options.conn, 'handshake'): - options.conn.handshake() + try: + options.conn.handshake() + except Exception: + dprint("Warning, handshake failed, closing connection.") + return False ret = 0 line = options.conn.recv(1024) if line.startswith("USERNAME") and line.split(' ')[1].strip() == options.config.username: -- cgit v1.2.3