Skip to content
shedokan edited this page Dec 8, 2015 · 14 revisions

How to prevent your bot from disconnecting after a specific time?

Make sure to include YowIqProtocolLayer in your stack, this layer handles the ping mesages like this:

# *snip*
from yowsup.layers.protocol_iq import YowIqProtocolLayer
# *snip*
layers = (
  YourLayer,
  YowParallelLayer(YowAuthenticationProtocolLayer, YowMessagesProtocolLayer, YowIqProtocolLayer, YowReceiptProtocolLayer,   YowAckProtocolLayer),
  ) + YOWSUP_CORE_LAYERS
# *snip*
stack = YowStack(layers)
# *snip*

TODO

Clone this wiki locally