-
Notifications
You must be signed in to change notification settings - Fork 178
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
EmbedIO HttpListenerMode doesn't detect client disconnects #457
Comments
Hello @ketodiet, thanks for using EmbedIO! The behavior you describe feels like a bug to me too. Which type of module do you use for the polling? Looks like |
Hi Riccardo, I'm not using websockets. The WebServer setup is:
Changing In the case of |
Hi @ketodiet, sorry for the delay. From what I could see from the source code, there are actually some flaws in connection management. I've begun an almost complete refactor of that part of EmbedIO, but in doing so I had to introduce a handful of breaking changes, so I'm afraid you'll have to wait for version 4 to see this issue (hopefully) fixed. |
Hi Riccardo, We're experiencing the exact same issue. Do you have any idea when we may see v4? |
@ketodiet, @simontuffley can you give me an example of code for continuous writes on HTTP connection? |
I confirm that there is such disconnection behavior. the code to repeat the error is simple:
It is convenient to receive data using curl command line, as well as terminate connections using ctl-c. At the same time, in the debugger during debugging, the occurring exceptions associated with the advice are visible, but they are not returned as exceptions to the code of the method from which it was called. |
Small changes in the source codes of the library easily solve this problem. remove: remove: insert and rename all next:
|
Another solution to this issue is globally enabling the write errors by configuring the
This method does not require touching the library internal class. |
A quick overview:
A number of client apps connect via a rev proxy to a service. The rev proxy is an ASP.NET app and the service is a c# windows service using EmbedIO to handle incoming requests. Client apps have two connections each: one for pushing updates and the one polling for changes.
The issue described here is related to the polling.
The Bug:
When using Microsoft HttpListenerMode when a client disconnects & the rev proxy removes the connection in response, the next write on the poll connection will fail (i.e. the service will fail to send any updates or heartbeat to the client via the rev proxy).
When using EmbedIO HttpListenerMode in the exact same scenario, the service writes keep succeeding with no errors reported at all. Even if the rev proxy process is terminated (i.e. stopping the IIS server hosting the rev proxy) the writes keep working with no exceptions thrown.
That feels like a bug to me.
The text was updated successfully, but these errors were encountered: