mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2026-02-16 14:13:46 +00:00
Compare commits
2 Commits
a7ff4416bd
...
28a2a0c7fd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28a2a0c7fd | ||
|
|
7dd1cd5bbd |
@ -802,7 +802,6 @@ namespace CryptoExchange.Net.Clients
|
|||||||
return new CallResult<HighPerfSocketConnection<TUpdateType>>(socketConnection);
|
return new CallResult<HighPerfSocketConnection<TUpdateType>>(socketConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Process an unhandled message
|
/// Process an unhandled message
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -811,6 +810,14 @@ namespace CryptoExchange.Net.Clients
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Process an unhandled message
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">The socket connection</param>
|
||||||
|
/// <param name="typeIdentifier">The type as identified</param>
|
||||||
|
/// <param name="data">The data</param>
|
||||||
|
protected internal virtual bool HandleUnhandledMessage(SocketConnection connection, string typeIdentifier, ReadOnlySpan<byte> data) => false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Process connect rate limited
|
/// Process connect rate limited
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -571,8 +571,12 @@ namespace CryptoExchange.Net.Sockets.Default
|
|||||||
|
|
||||||
if (deserializationType == null)
|
if (deserializationType == null)
|
||||||
{
|
{
|
||||||
// No handler found for identifier either, can't process
|
if (!ApiClient.HandleUnhandledMessage(this, typeIdentifier, data))
|
||||||
_logger.LogWarning("Failed to determine message type for identifier {Identifier}. Data: {Message}", typeIdentifier, Encoding.UTF8.GetString(data.ToArray()));
|
{
|
||||||
|
// No handler found for identifier either, can't process
|
||||||
|
_logger.LogWarning("Failed to determine message type for identifier {Identifier}. Data: {Message}", typeIdentifier, Encoding.UTF8.GetString(data.ToArray()));
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,8 @@ namespace CryptoExchange.Net
|
|||||||
/// <param name="api"></param>
|
/// <param name="api"></param>
|
||||||
internal static void RegisterRestApi(string api)
|
internal static void RegisterRestApi(string api)
|
||||||
{
|
{
|
||||||
_lastRestDelays[api] = new RestTimeOffset();
|
if (!_lastRestDelays.ContainsKey(api))
|
||||||
|
_lastRestDelays.TryAdd(api, new RestTimeOffset());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user