diff options
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/components/chat/xmpp.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sca-cpp/trunk/components/chat/xmpp.hpp b/sca-cpp/trunk/components/chat/xmpp.hpp index 0f84d5ec4a..34ab13ed98 100644 --- a/sca-cpp/trunk/components/chat/xmpp.hpp +++ b/sca-cpp/trunk/components/chat/xmpp.hpp @@ -318,7 +318,8 @@ const failable<bool> listen(const lambda<failable<bool>(const value&, const valu debug("chat::listen"); xc.listener = listener; xmpp_handler_add(xc.conn, messageHandler, NULL, "message", NULL, &xc); - while(xc.connected && !isNil(xc.listener)) + xc.ctx->loop_status = XMPP_LOOP_RUNNING; + while(xc.connected && !isNil(xc.listener) && xc.ctx->loop_status == XMPP_LOOP_RUNNING) xmpp_run_once(xc.ctx, 1000L); return true; } |