aboutsummaryrefslogtreecommitdiff
path: root/src/Sproxy
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-11-24 23:24:31 +0300
committerIgor Pashev <pashev.igor@gmail.com>2016-11-24 23:24:31 +0300
commita3739193953b2ccbe9174d76de8adf122269fbb5 (patch)
tree15f949eee44b94921613f0a2ab809dce1da3e631 /src/Sproxy
parent808b6212cc2d90f2ea6dbeb25f9ae4cb292fc19a (diff)
downloadsproxy2-a3739193953b2ccbe9174d76de8adf122269fbb5.tar.gz
Disable printing exceptions
We have our own traps and logging.
Diffstat (limited to 'src/Sproxy')
-rw-r--r--src/Sproxy/Server.hs6
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.