-
Notifications
You must be signed in to change notification settings - Fork 17
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
html client on page refresh or tab close websocket disconnect , is not fired on server side during message process #56
Comments
Hi @ManoLazar! WebSocket instance doesn't have control flow, so it can't emit events or even update it's internal state (IsConnected, etc) till |
what about the 1st topic , detect from client to server websocket changes during |
Actually I can't reproduce. Also it's reporting disconnect on next Can you find right conditions to reproduce this behavior? |
Hi @deniszykov |
...
while(webSocket.IsConnected && !cancellation.IsCancellationRequested) {
try {
var messageText = await webSocket.ReadStringAsync(cancellation).ConfigureAwait(false);
...
messageProcess(messageText) ;
await webSocket.WriteStringAsync(messageText, cancellation).ConfigureAwait(false);
...
so:
during the messageProcess () - can be with await
when html client reload page or TAB close, the webSocket is not fired as disconnect ??
and cause stuck on webSocket.WriteString...
if it is not during the messageProcess the server websocket listner fires correctly
why the code is written with while(webSocket.isConnected...) ?
and not just :
websocket.OnMessage(...)
webSocket.OnDisconnect(...)
webSocket.OnError(...)
so even on during messageProcess, if occur the disconnect event it will be fired ?
any help ?
regards,
Mano
The text was updated successfully, but these errors were encountered: