From a3739193953b2ccbe9174d76de8adf122269fbb5 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Thu, 24 Nov 2016 23:24:31 +0300 Subject: Disable printing exceptions We have our own traps and logging. --- src/Sproxy/Server.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Sproxy/Server.hs b/src/Sproxy/Server.hs index bd2af17..98e9d56 100644 --- a/src/Sproxy/Server.hs +++ b/src/Sproxy/Server.hs @@ -18,7 +18,8 @@ import Network.Socket ( Family(AF_INET, AF_UNIX), SockAddr(SockAddrInet, SockAdd SocketOption(ReuseAddr), SocketType(Stream), bind, close, connect, inet_addr, listen, maxListenQueue, setSocketOption, socket ) import Network.Wai.Handler.WarpTLS (tlsSettingsChain, runTLSSocket) -import Network.Wai.Handler.Warp (defaultSettings, setHTTP2Disabled, runSettingsSocket) +import Network.Wai.Handler.Warp ( defaultSettings, runSettingsSocket, + setHTTP2Disabled, setOnException ) import System.Entropy (getEntropy) import System.Environment (setEnv) import System.Exit (exitFailure) @@ -96,7 +97,8 @@ server configFile = do let settings = - (if cfHTTP2 cf then id else setHTTP2Disabled) + (if cfHTTP2 cf then id else setHTTP2Disabled) $ + setOnException (\_ _ -> return ()) defaultSettings -- XXX 2048 is from bindPortTCP from streaming-commons used internally by runTLS. -- cgit v1.2.3