Allow the XMPP event handler to run in separate thread