Changeset dcfa886


Ignore:
Timestamp:
2015-05-29T05:21:18Z (5 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
d628339
Parents:
50ddfad
Message:

Try to disable the ping thread using a cleaner (very new) method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/wa.py

    r50ddfad rdcfa886  
    5656logger.addHandler(ch)
    5757
    58 # Yowsup starts an entire THREAD just to do pings. I'll do them myself TYVM.
    59 from yowsup.layers.protocol_iq.layer import YowPingThread
    60 YowPingThread.start = lambda x: None
    6158
    6259# Tried this but yowsup is not passing back the result, will have to update the library. :-(
     
    404401                stack.setProp(YowCoderLayer.PROP_DOMAIN, YowConstants.DOMAIN)
    405402                stack.setProp(YowCoderLayer.PROP_RESOURCE, env.CURRENT_ENV.getResource())
     403                try:
     404                        stack.setProp(YowIqProtocolLayer.PROP_PING_INTERVAL, 0)
     405                except AttributeError:
     406                        # Ping setting only exists since May 2015.
     407                        from yowsup.layers.protocol_iq.layer import YowPingThread
     408                        YowPingThread.start = lambda x: None
     409
    406410                stack.setProp("org.bitlbee.Bijtje", self)
    407411
Note: See TracChangeset for help on using the changeset viewer.