Skip to content

Commit

Permalink
Small fixes to parsing notifications from streaming client.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiago18c committed May 23, 2021
1 parent 675736f commit 3e4837b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Solnet.Rpc/Core/Sockets/SolanaStreamingClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ private async Task ReadNextMessage(CancellationToken cancellationToken = default

private void HandleNewMessage(Memory<byte> mem)
{
JsonReaderOptions opts = new JsonReaderOptions() { MaxDepth = 1 };
Utf8JsonReader asd = new Utf8JsonReader(mem.Span, opts);
Utf8JsonReader asd = new Utf8JsonReader(mem.Span);

asd.Read();

Expand All @@ -120,13 +119,9 @@ private void HandleNewMessage(Memory<byte> mem)
{
case JsonTokenType.PropertyName:
prop = asd.GetString();
break;
case JsonTokenType.StartObject:
if (prop == "params")
{
HandleDataMessage(ref asd, method);
//
//
}
break;
case JsonTokenType.String:
Expand Down

0 comments on commit 3e4837b

Please sign in to comment.