event: let event loop start after xmpp_stop()

This commit is contained in:
Dmitry Podgorny
2016-04-13 10:20:55 +00:00
parent b169c0a91e
commit e60895087e

View File

@@ -88,7 +88,6 @@ void xmpp_run_once(xmpp_ctx_t *ctx, const unsigned long timeout)
int tls_read_bytes = 0;
if (ctx->loop_status == XMPP_LOOP_QUIT) return;
ctx->loop_status = XMPP_LOOP_RUNNING;
/* send queued data */
connitem = ctx->connlist;
@@ -347,6 +346,9 @@ void xmpp_run(xmpp_ctx_t *ctx)
xmpp_run_once(ctx, DEFAULT_TIMEOUT);
}
/* make it possible to start event loop again */
ctx->loop_status = XMPP_LOOP_NOTSTARTED;
xmpp_debug(ctx, "event", "Event loop completed.");
}