Closed dev31337 closed 3 years ago
Solved by using xmpp_run_once() instead :)
xmpp_run()
runs the event loop until xmpp_stop()
is called. xmpp_ctx_set_timeout()
controls timeout for I/O event notification within xmpp_run()
-- it doesn't affect xmpp_run_once()
.
You need to choose between xmpp_run()
and xmpp_run_once()
depending on your use-case. examples/bot.c
shows how to write a program with xmpp_run()
.
Setting xmpp_ctx_set_timeout(ctx,50) has no effect on xmpp_run(ctx) which never times out (never returns).