Skip to content

#394: added WebSocket.SendTimout to fix issue: https://github.com/sta…#395

Open
6opuc wants to merge 1 commit intosta:masterfrom
6opuc:master
Open

#394: added WebSocket.SendTimout to fix issue: https://github.com/sta…#395
6opuc wants to merge 1 commit intosta:masterfrom
6opuc:master

Conversation

@6opuc
Copy link
Copy Markdown

@6opuc 6opuc commented Aug 16, 2017

…/websocket-sharp/issues/394

Problem description:
One of our web socket clients for some reason stopped receiving messages(Some bug in our client code). This stopped message delivery to all other clients. After investigating this issue we saw that WebSocketServiceManager.Broadcast() got stuck on delivery to that buggy client for 5+ hours.

Steps to reproduce:

  1. Start WebSocketServer
  2. Connect to WebSocket from client(without Receive)
  3. Start loop with WebSocketServiceManager.Broadcast(/1KB/) with 10000 iterations

Actual result:
WebSocketServiceManager.Broadcast() got stuck on 172th iteration

Expected result:
Loop should complete successfully

Proposed solution:
Add property WebSocket.SendTimeout to limit sending message into socket.

@jmalley31
Copy link
Copy Markdown

@sta Can we implement something like this? I'm running into an issue where my Socket.Send is just getting hung and not returning. This is causing my application to just sit there and not continue on. I am 100% sure that the state of the connection is open. Having the ability to put a timeout directly onto the send is the only way I can see our problem getting fixed.

@SaraAkmal
Copy link
Copy Markdown

@sta Hi! I'm wondering if this has been solved because I'm facing similar issues

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

Successfully merging this pull request may close these issues.

3 participants