1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-08-31 12:42:00 +00:00

Compare commits

...

2 Commits

2 changed files with 4 additions and 6 deletions

View File

@ -47,7 +47,7 @@ namespace CryptoExchange.Net.Sockets
/// </summary>
public static MessageMatcher Create<T>(string value)
{
return new MessageMatcher(new MessageHandlerLink<T>(MessageLinkType.Full, value, (con, msg) => CallResult.SuccessResult));
return new MessageMatcher(new MessageHandlerLink<T>(MessageLinkType.Full, value, (con, msg) => new CallResult<T>(default, msg.OriginalData, null)));
}
/// <summary>

View File

@ -187,11 +187,8 @@ namespace CryptoExchange.Net.Sockets
return CallResult.SuccessResult;
CurrentResponses++;
if (CurrentResponses == RequiredResponses)
{
Completed = true;
Response = message.Data;
}
if (CurrentResponses == RequiredResponses)
Response = message.Data;
if (Result?.Success != false)
// If an error result is already set don't override that
@ -199,6 +196,7 @@ namespace CryptoExchange.Net.Sockets
if (CurrentResponses == RequiredResponses)
{
Completed = true;
_event.Set();
if (ContinueAwaiter != null)
await ContinueAwaiter.WaitAsync().ConfigureAwait(false);