examples: updates to reflect asyncio

This commit is contained in:
mathieui
2021-01-27 00:09:26 +01:00
parent 70b5081018
commit 9390794401
2 changed files with 12 additions and 10 deletions

View File

@@ -168,13 +168,13 @@ if __name__ == '__main__':
xmpp.beClientOrServer(server=True)
while not(xmpp.testForRelease()):
xmpp.connect()
xmpp.process(block=True)
xmpp.process(forever=False)
logging.debug("lost connection")
if args.sensorjid:
logging.debug("will try to call another device for data")
xmpp.beClientOrServer(server=False,clientJID=args.sensorjid)
xmpp.connect()
xmpp.process(block=True)
xmpp.process(forever=False)
logging.debug("ready ending")
else: