mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
set tcp hang up time to 60s instead of default 30s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user