race issue can cause that Websocket connection never be removed in heartbeat on server after the client loses internet connection and become disconnected #1272

Open
Xiaohongt opened this Issue Jan 9, 2013 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

Xiaohongt commented Jan 9, 2013

We saw a race issue in OwinWebSocketHandler.ProcessRequestAsync that handler.End() got called before handler.ProcessWebSocketRequestAsync() completed.

Easyway to see the repro:

  1. in app, set GlobalHost.Configuration.KeepAlive = 0;
  2. request JS webSockets transport client on remote machine and start connection
  3. disconnect network
  4. debug the code on server

we can see that in OwinWebSocketHandler.ProcessRequestAsync that handler.End() get called before handler.ProcessWebSocketRequestAsync() complete, _raiseEvent become false, socket.OnClose doesn't get called, and Websocket connection IsAlive is still true.

davidfowl was assigned Jan 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment