diff --git a/.swift-version b/.swift-version index 803d94e1..feb96e1d 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.6.3 +5.7.3 diff --git a/Sources/FoundationHTTP/Web3WebSocketProvider.swift b/Sources/FoundationHTTP/Web3WebSocketProvider.swift index 8f04e481..287d36fa 100644 --- a/Sources/FoundationHTTP/Web3WebSocketProvider.swift +++ b/Sources/FoundationHTTP/Web3WebSocketProvider.swift @@ -97,6 +97,9 @@ public class Web3WebSocketProvider: Web3Provider, Web3BidirectionalProvider { deinit { closed = true _ = webSocket.close(code: .goingAway) + + // As described in https://github.com/apple/swift-nio/issues/2371 + try? wsEventLoopGroup.syncShutdownGracefully() } // MARK: - Web3Provider