Changeset 5a4f22e for protocols/skype


Ignore:
Timestamp:
2013-02-11T12:56:04Z (12 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
4da4e9b
Parents:
8e166ae
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: don't do retries on send() on socket errors with gobject

As it's a blocking socket, I imagine there might be only EINTR
errors from signals, which don't seem to be used here.
I think the same tweak can be applied to select() code, but
I don't run it, so no idea if Skype4Py threads might make such loop
necessary there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skyped.py

    r8e166ae r5a4f22e  
    127127        global options
    128128        if hasgobject:
    129                 for attempt in xrange(1, tries+1):
    130                         try:
    131                                 sock.sendall(txt)
    132                         except Exception, s:
    133                                 dprint("Warning, sending '%s' failed (%s). count=%d" % (txt, s, attempt))
    134                                 time.sleep(1)
    135                         else:
    136                                 break
    137                 else:
     129                if not options.conn: return
     130                try:
     131                        sock.sendall(txt)
     132                except Exception, s:
     133                        dprint("Warning, sending '%s' failed (%s)." % (txt, s))
    138134                        options.conn.close()
     135                        options.conn = False
    139136        else:
    140137                for attempt in xrange(1, tries+1):
Note: See TracChangeset for help on using the changeset viewer.