Changeset 4da4e9b for protocols/skype


Ignore:
Timestamp:
2013-02-11T12:56:04Z (11 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
b6ab05b
Parents:
5a4f22e
git-author:
Mike Kazantsev <mk.fraggod@…> (11-02-13 12:56:04)
git-committer:
Miklos Vajna <vmiklos@…> (11-02-13 12:56:04)
Message:

skype: handle socket errors during tls session negotiation in a graceful way

Before this patch, such errors (which happen 1/4 times here) lock
skyped forever, producing traceback (and hanging because threads
in python).
Proper fix would be to see why these happen (might be ssl handling
in the plugin), but that's no excuse not to handle socket errors
without crashing the daemon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skyped.py

    r5a4f22e r4da4e9b  
    202202                        keyfile=options.config.sslkey,
    203203                        ssl_version=ssl.PROTOCOL_TLSv1)
    204         except ssl.SSLError:
    205                 dprint("Warning, SSL init failed, did you create your certificate?")
    206                 return False
     204        except (ssl.SSLError, socket.error) as err:
     205                if isinstance(err, ssl.SSLError):
     206                        dprint("Warning, SSL init failed, did you create your certificate?")
     207                        return False
     208                else:
     209                        dprint('Warning, SSL init failed')
     210                        return True
    207211        if hasattr(options.conn, 'handshake'):
    208212                try:
Note: See TracChangeset for help on using the changeset viewer.