diff --git a/source/Halibut/Transport/TcpClientExtensions.cs b/source/Halibut/Transport/TcpClientExtensions.cs index ac2e752f..c801af88 100644 --- a/source/Halibut/Transport/TcpClientExtensions.cs +++ b/source/Halibut/Transport/TcpClientExtensions.cs @@ -43,6 +43,7 @@ void DisposeClient() { try { + client.CloseImmediately(); ((IDisposable) client).Dispose(); } catch (SocketException) diff --git a/source/Halibut/Transport/TcpConnectionFactory.cs b/source/Halibut/Transport/TcpConnectionFactory.cs index d3e96627..1d51c591 100644 --- a/source/Halibut/Transport/TcpConnectionFactory.cs +++ b/source/Halibut/Transport/TcpConnectionFactory.cs @@ -93,7 +93,7 @@ internal static TcpClient CreateTcpClientAsync(AddressFamily addressFamily, Hali var client = new TcpClient(addressFamily) { SendTimeout = (int)halibutTimeoutsAndLimits.TcpClientSendTimeout.TotalMilliseconds, - ReceiveTimeout = (int)halibutTimeoutsAndLimits.TcpClientReceiveTimeout.TotalMilliseconds + ReceiveTimeout = (int)halibutTimeoutsAndLimits.TcpClientReceiveTimeout.TotalMilliseconds, }; if (client.Client.AddressFamily == AddressFamily.InterNetworkV6)