1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-11-04 01:07:46 +00:00

Fixed socket cleanup after connection failures (#301)

This commit is contained in:
nils2525
2026-11-03 04:39:50 -08:00
committed by GitHub
parent f88ed02735
commit e45fa235e0
@@ -899,6 +899,8 @@ namespace CryptoExchange.Net.Clients
return connectResult;
}
// Remove the connection and stop any reconnect processing before disposing it.
await socketConnection.CloseAsync().ConfigureAwait(false);
socketConnection.Dispose();
return connectResult;
}