Send real-time score update event simultaneously by two client.
System.InvalidOperationException: There is already one outstanding 'SendAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.WebSocketBase.SendAsyncCore(ArraySegment`1 buffer, WebSocketMessageType messageType, Boolean endOfMessage, CancellationToken cancellationToken)
at TournamentAssistantCore.Sockets.Server.Send(ConnectedUser connectedUser, PacketWrapper packet) in TournamentAssistant\TournamentAssistantCore\Sockets\Server.cs:line 349
Client Disconnected!
Sending data: (Event) (user_left_event)
Received data: (ForwardingPacket) (Push)
System.Net.WebSockets.WebSocketException (0x80004005): The 'System.Net.WebSockets.ServerWebSocket' instance cannot be used for communication because it has been transitioned into the 'Aborted' state.
---> System.Net.WebSockets.WebSocketException (0x80004005): The 'System.Net.WebSockets.ServerWebSocket' instance cannot be used for communication because it has been transitioned into the 'Aborted' state.
at System.Net.WebSockets.WebSocketProtocolComponent.ThrowIfSessionHandleClosed(WebSocketBase webSocket)
at System.Net.WebSockets.WebSocketProtocolComponent.WebSocketGetAction(WebSocketBase webSocket, ActionQueue actionQueue, Buffer[] dataBuffers, UInt32& dataBufferCount, Action& action, BufferType& bufferType, IntPtr& actionContext)
at System.Net.WebSockets.WebSocketBase.WebSocketOperation.Process(Nullable`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.WebSocketBase.SendAsyncCore(ArraySegment`1 buffer, WebSocketMessageType messageType, Boolean endOfMessage, CancellationToken cancellationToken)
at System.Net.WebSockets.WebSocketBase.ThrowIfAborted(Boolean aborted, Exception innerException)
at System.Net.WebSockets.WebSocketBase.ThrowIfConvertibleException(String methodName, Exception exception, CancellationToken cancellationToken, Boolean aborted)
at System.Net.WebSockets.WebSocketBase.SendAsyncCore(ArraySegment`1 buffer, WebSocketMessageType messageType, Boolean endOfMessage, CancellationToken cancellationToken)
at TournamentAssistantCore.Sockets.Server.Send(ConnectedUser connectedUser, PacketWrapper packet) in TournamentAssistant\TournamentAssistantCore\Sockets\Server.cs:line 349
I think exception is self-explanatory.