Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I get an exception. System.ArgumentException: An item with the same key has already been added. Key: Date #173

Open
MakcStudio opened this issue May 28, 2020 · 1 comment

Comments

@MakcStudio
Copy link

Hi. I use the library and get this exception sometimes. Is there any way to fix this?

2020-05-28 18:00:51.3025 WaxpeerApp.Program.CurrentDomain_UnhandledException Fatal: CurrentDomain_UnhandledException - CrashProgramm -> System.ArgumentException: An item with the same key has already been added. Key: Date
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at WebSocket4Net.Extensions.ParseMimeHeader(String source, IDictionary`2 valueContainer, String& verbLine)
   at WebSocket4Net.Protocol.DraftHybi10Processor.VerifyHandshake(WebSocket websocket, WebSocketCommandInfo handshakeInfo, String& description)
   at WebSocket4Net.Command.Handshake.ExecuteCommand(WebSocket session, WebSocketCommandInfo commandInfo)
   at WebSocket4Net.WebSocket.OnDataReceived(Byte[] data, Int32 offset, Int32 length)
   at WebSocket4Net.WebSocket.client_DataReceived(Object sender, DataEventArgs e)
   at SuperSocket.ClientEngine.ClientSession.OnDataReceived(Byte[] data, Int32 offset, Int32 length)
   at SuperSocket.ClientEngine.AuthenticatedStreamTcpSession.ReadAsync()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 
 
<>c.<ThrowAsync>b__139_1 => ExceptionDispatchInfo.Throw => Program.CurrentDomain_UnhandledException
@MakcStudio
Copy link
Author

image

I use it like this. Is this possible because of async void ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant