diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-11-24 23:24:31 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-11-24 23:24:31 +0300 |
commit | a3739193953b2ccbe9174d76de8adf122269fbb5 (patch) | |
tree | 15f949eee44b94921613f0a2ab809dce1da3e631 /src | |
parent | 808b6212cc2d90f2ea6dbeb25f9ae4cb292fc19a (diff) | |
download | sproxy2-a3739193953b2ccbe9174d76de8adf122269fbb5.tar.gz |
Disable printing exceptions
We have our own traps and logging.
Diffstat (limited to 'src')
-rw-r--r-- | src/Sproxy/Server.hs | 6 |
1 files 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. |