~singpolyma/cheogram-muc-bridge

1a6f40692ae4354e29e2aa985fb62f7266d383ae — Stephen Paul Weber 2 years ago 35e1fb6
Handle incoming stanzas one-by-one

We are sharing the sqlite connection everywhere and may be seeing race
conditions.  At least until we can rule that out, let's be safe and only process
stazas one-by-one instead of in infinite threads.
1 files changed, 1 insertions(+), 1 deletions(-)

M Router.hs
M Router.hs => Router.hs +1 -1
@@ 16,7 16,7 @@ runRoutedComponent server secret =
	ExceptT . XMPP.runComponent server secret . (runRouted =<<)

runRouted :: Routes -> XMPP.XMPP ()
runRouted routes = forever $ XMPP.getStanza >>= (void . forkXMPP . handle)
runRouted routes = forever $ XMPP.getStanza >>= (void . handle)
	where
	handle (XMPP.ReceivedPresence presence@XMPP.Presence {
		XMPP.presenceType = XMPP.PresenceProbe