Skip to content

Commit

Permalink
🐛 Fix issue on receive multiple websocket connection confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielePicco committed Nov 23, 2023
1 parent e8f33d9 commit 0402baf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Solana.Unity.Rpc/SolanaStreamingRpcClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ private void ConfirmSubscription(int internalId, int resultId)
if (_unconfirmedRequests.Remove(internalId))
{
sub.SubscriptionId = resultId;
_confirmedSubscriptions.Add(resultId, sub);
if(!_confirmedSubscriptions.ContainsKey(resultId))
_confirmedSubscriptions.Add(resultId, sub);
}
}

Expand Down

0 comments on commit 0402baf

Please sign in to comment.