Changeset f85837a


Ignore:
Timestamp:
2010-12-28T13:06:16Z (13 years ago)
Author:
Philippe Crama <pcfeb0009@…>
Branches:
master
Children:
ae8cc50
Parents:
1130561
Message:

Close connection when going offline

When the user disconnects from bitlbee (either by quitting or by
logging out "account skype off"), skyped should close its connection
and wait for a new connection.

This change is useful to make the test cases pass as otherwise,
skyped would not notice that the first test was done and that the
second test was trying to connect, thus leading to a failure in
the second test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skyped.py

    r1130561 rf85837a  
    7878                return True
    7979        else:
     80                close_socket = False
    8081                if wait_for_lock(options.lock, 3, 10, "input_handler"):
    8182                        try:
     
    8990                                return False
    9091                        for i in input.split("\n"):
     92                                if i.strip() == "SET USERSTATUS OFFLINE":
     93                                        close_socket = True
    9194                                skype.send(i.strip())
    92                 return True
     95                return not(close_socket)
    9396
    9497def skype_idle_handler(skype):
Note: See TracChangeset for help on using the changeset viewer.