~singpolyma/jingle-xmpp

86b69389adca05f1c7b47799ae337d8a1c08f805 — Stephen Paul Weber 19 days ago 0e18d3e master
Use userError instead of error in case a non-IOError appears
1 files changed, 2 insertions(+), 2 deletions(-)

M Jingle/Socks5Server.hs
M Jingle/Socks5Server.hs => Jingle/Socks5Server.hs +2 -2
@@ 22,7 22,7 @@ start :: (Unexceptional m) =>
	-> (JingleTSID -> UIO (Maybe Int))
	-> (JingleTSID -> FilePath -> UIO ())
	-> m (Either IOError ())
start storePath ports logger getSize transferFinished = UIO.fromIO' (error.show) $
start storePath ports logger getSize transferFinished = UIO.fromIO' (userError . show) $
	forM_ ports $ \port -> do
		Just family <- return $ addrToFamily port
		socket <- Socket.socket family Socket.Stream 0


@@ 44,7 44,7 @@ start storePath ports logger getSize transferFinished = UIO.fromIO' (error.show)

	afterAccept port socket (Right (conn, _)) = do
		void $ UIO.forkFinally
			(UIO.fromIO' (error.show) $ processConnection conn)
			(UIO.fromIO' (userError . show) $ processConnection conn)
			afterAfterAccept
		threadLoop port socket
	afterAccept port socket (Left e) = do