WatsonTcp is the easiest way to build TCP-based clients and servers in C#.
599
stars
117
forks
source link
WatsonTcpServer v6.0.3 throws ArgumentException when disposed: "An item with the same key has already been added" #304
Open
yallie opened 2 weeks ago
Hello!
Not sure if it's relevant to issue #303, but sometimes I get another exception from the code below:
The error originates here: WatsonTcpServer.cs, line 572
The problem is introduced in this commit: NuGet v6.0.3, internal refactor e.g. ClientManager).
Older versions use
ConcurrentDictionary
instances for clients, last seen, kicked, etc:New refactored version use ordinal
Dictionary
instances protected by locks in ClientMetadataManager.cs:Older versions use _ClientsKicked.TryAdd which is thread-safe by design:
Can we revert it back to
ConcurrentDictionary
?