diff --git a/chainweb.cabal b/chainweb.cabal index 1fa2ac45e1..3eeedd3627 100644 --- a/chainweb.cabal +++ b/chainweb.cabal @@ -394,6 +394,7 @@ library , hashable >= 1.4 , heaps >= 0.3 , hourglass >=0.2 + , http2 >= 5.2.1 , http-client >= 0.5 , http-client-tls >=0.3 , http-media >= 0.7 diff --git a/changes/2024-05-30T150038-0400.txt b/changes/2024-05-30T150038-0400.txt new file mode 100644 index 0000000000..55590e4e37 --- /dev/null +++ b/changes/2024-05-30T150038-0400.txt @@ -0,0 +1 @@ +Stop logging ConnectionIsClosed diff --git a/src/Chainweb/Chainweb.hs b/src/Chainweb/Chainweb.hs index be16a75d7f..683d6f8207 100644 --- a/src/Chainweb/Chainweb.hs +++ b/src/Chainweb/Chainweb.hs @@ -123,6 +123,7 @@ import qualified Data.Vector as V import GHC.Generics import qualified Network.HTTP.Client as HTTP +import qualified Network.HTTP2.Client as HTTP2 import Network.Socket (Socket) import Network.Wai import Network.Wai.Handler.Warp hiding (Port) @@ -785,6 +786,10 @@ runChainweb cw nowServing = do return () | Just ClientClosedConnectionPrematurely <- fromException e = inc clientClosedConnectionsCounter + -- this isn't really an error, this is a graceful close. + -- see https://github.com/kazu-yamamoto/http2/issues/102 + | Just HTTP2.ConnectionIsClosed <- fromException e = + return () | otherwise = when (defaultShouldDisplayException e) $ logg Warn $ loggServerError msg r e