diff options
Diffstat (limited to 'protocols/skype/skyped.py')
-rw-r--r-- | protocols/skype/skyped.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/protocols/skype/skyped.py b/protocols/skype/skyped.py index 57b2f9ce..68008fbf 100644 --- a/protocols/skype/skyped.py +++ b/protocols/skype/skyped.py @@ -126,16 +126,13 @@ def skype_idle_handler(skype): def send(sock, txt, tries=10): global options if hasgobject: - for attempt in xrange(1, tries+1): - try: - sock.sendall(txt) - except Exception, s: - dprint("Warning, sending '%s' failed (%s). count=%d" % (txt, s, attempt)) - time.sleep(1) - else: - break - else: + if not options.conn: return + try: + sock.sendall(txt) + except Exception, s: + dprint("Warning, sending '%s' failed (%s)." % (txt, s)) options.conn.close() + options.conn = False else: for attempt in xrange(1, tries+1): if not options.conn: break |