mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Add missing lock to ensure thread-safe mutations of _activeInnerStreams in VirtualConnectionClient.cs
This commit is contained in:
@@ -46,7 +46,11 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels.VirtualConnections
|
||||
|
||||
var id = Interlocked.Increment(ref _nextInnerStreamId);
|
||||
var newInnerStream = new VirtualConnection(id, this);
|
||||
lock (_activeInnerStreams)
|
||||
{
|
||||
_activeInnerStreams.Add(id, newInnerStream);
|
||||
}
|
||||
|
||||
return newInnerStream;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user