From fefb4655e6481bc9cb267b201a8d910b690f7721 Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Thu, 17 Feb 2022 13:42:17 -0700 Subject: [PATCH] set tcp hang up time to 60s instead of default 30s --- src/Application.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Application.hs b/src/Application.hs index a18e31b..cb44baa 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -51,6 +51,7 @@ import Network.Wai.Handler.Warp ( Settings , setHost , setOnException , setPort + , setTimeout ) import Network.Wai.Handler.WarpTLS import Network.Wai.Middleware.AcceptOverride @@ -255,7 +256,8 @@ makeAuthWare _ app req res = next -- | Warp settings for the given foundation value. warpSettings :: AppPort -> RegistryCtx -> Settings warpSettings port foundation = - setPort (fromIntegral port) + setTimeout 60 + $ setPort (fromIntegral port) $ setHost (appHost $ appSettings foundation) $ setOnException (\_req e -> when (defaultShouldDisplayException e) $ messageLoggerSource