ignoring an exception from shutdown (gracefulClose).
commitf9be8714ac0fe3f0e02b3e06264977f3c29a7f25
authorKazu Yamamoto <kazu@iij.ad.jp>
dateMon 20 Jan 2020, 13:37 (7 years ago)
parent0890255
warp-tls/Network/Wai/Handler/WarpTLS.hs+1−1
@@ -361,7 +361,7 @@ httpOverTls TLSSettings{..} _set s bs0 params = do
361361 backend recvN = TLS.Backend {
362362 TLS.backendFlush = return ()
363363#if MIN_VERSION_network(3,1,1)
364− , TLS.backendClose = gracefulClose s 5000
364+ , TLS.backendClose = gracefulClose s 5000 `E.catch` \(SomeException _) -> return ()
365365#else
366366 , TLS.backendClose = close s
367367#endif
warp/Network/Wai/Handler/Warp/Run.hs+1−1
@@ -76,7 +76,7 @@ socketConnection set s = do
7676 if tm == 0 then
7777 close s
7878 else
79− gracefulClose s tm
79+ gracefulClose s tm `E.catch` \(E.SomeException _) -> return ()
8080#else
8181 , connClose = close s
8282#endif