diff --git a/src/Simplex/Messaging/Transport.hs b/src/Simplex/Messaging/Transport.hs index f3f553b79..87f4ef5a9 100644 --- a/src/Simplex/Messaging/Transport.hs +++ b/src/Simplex/Messaging/Transport.hs @@ -176,7 +176,7 @@ withTlsUnique peer cxt f = closeTLS :: T.Context -> IO () closeTLS ctx = T.bye ctx -- sometimes socket was closed before 'TLS.bye' so we catch the 'Broken pipe' error here - `catchAll_` T.contextClose ctx + `E.finally` T.contextClose ctx `catchAll_` pure () supportedParameters :: T.Supported