-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SocketException: Connection reset by peer (OS Error: Connection reset by peer) #55776
Comments
You would need to post a reproduction etc. Without code we could debug this is unactionable. |
@mraleph I am not doing anything fancy basically everything i do boils down to this:
|
can someone tell me a way to handle this exception? |
please help @mraleph i just need someone to tell me how to handle exceptions which are thrown in the lifecycle of the websocket |
@leeflix The challenge I am having here is that we need a way to reproduce this. Without reproduction it is hard to say what and where exactly is going wrong. I have tried some variations of trying to connect to WS server and then abruptly close connections - but I was not able to reproduce this sort of crash. If this was a raw socket API, then I could just say that the code is using So we really need a repro to be able to fix this. |
@mraleph any ideas why it says "SocketException" and not "WebSocketException". does that not indicate that the error is not caught on the Socket API level? also any ideas where this string "Connection reset by peer" comes from? |
@leeflix it's |
@mraleph so i still can't find the error. i added a lot of error handling so at least only the ws dies and not the whole application but still i don't get why the websockt closes just because a peer does something weird this should never happen by default. we cannot user live updates in out app if this is not fixed:
|
switched to sse |
I am using websockets in my dart application. My server occasionally crashes when a "peer resets the connection". I think its odd that an exception crashes the program. Is there any way to handle this?
The text was updated successfully, but these errors were encountered: