diff --git a/CryptoExchange.Net/CryptoExchange.Net.csproj b/CryptoExchange.Net/CryptoExchange.Net.csproj index c8daecb..f3d46ad 100644 --- a/CryptoExchange.Net/CryptoExchange.Net.csproj +++ b/CryptoExchange.Net/CryptoExchange.Net.csproj @@ -6,16 +6,16 @@ CryptoExchange.Net JKorf A base package for implementing cryptocurrency exchange API's - 4.0.6 + 4.0.7 4.0.0 - 4.0.6 + 4.0.7 false git https://github.com/JKorf/CryptoExchange.Net.git https://github.com/JKorf/CryptoExchange.Net en true - 4.0.6 - Removed some debug logging + 4.0.7 - Additional error info on websocket exception enable 8.0 MIT diff --git a/CryptoExchange.Net/SocketClient.cs b/CryptoExchange.Net/SocketClient.cs index ba9683f..637c505 100644 --- a/CryptoExchange.Net/SocketClient.cs +++ b/CryptoExchange.Net/SocketClient.cs @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Net.WebSockets; using System.Threading; using System.Threading.Tasks; using CryptoExchange.Net.Authentication; @@ -532,7 +533,10 @@ namespace CryptoExchange.Net socket.DataInterpreterString = dataInterpreterString; socket.OnError += e => { - log.Write(LogLevel.Warning, $"Socket {socket.Id} error: " + e); + if(e is WebSocketException wse) + log.Write(LogLevel.Warning, $"Socket {socket.Id} error: Websocket error code {wse.WebSocketErrorCode}, details: " + e.ToLogString()); + else + log.Write(LogLevel.Warning, $"Socket {socket.Id} error: " + e.ToLogString()); }; return socket; } diff --git a/README.md b/README.md index 844aad3..466324f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ CryptoExchange.Net is a base package which can be used to easily implement crypt By me: +
+
+Binance +

Bittrex @@ -316,6 +320,9 @@ private void SomeMethod() ```` ## Release notes +* Version 4.0.7 - 24 Aug 2021 + * Additional error info on websocket exception + * Version 4.0.6 - 24 Aug 2021 * Removed some debug logging