Conversation
Errors occurring during the initialization of a WebSocket weren’t notified to the WebSocketTransport that was leaking by returning IsAlive = true forever
|
Hi @Idhor, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
|
When does this happen? |
|
onClose/onError listeners aren't set immediately when using the websocket so if an error occurs during the initialization the transport will be considered alive forever even if the real websocket is closed and disposed |
|
Bump. Is this thread still alive ? |
|
Bump. I would be interested seeing this fix being accepted. |
|
Can confirm this commit fixed our issue where the amount of connections went from a stable 20.000 to 200.000+ causing the server to be unavailable until restarted. |
|
Looks like a better fix would be to make sure these events are wired up before SignalR starts reading data from the websocket (i.e. before this line) |
|
Certainly there is a better method to fix this but at that time we needed a rapid fix for connection leaks instead of ditching SignalR |
|
It was fixed by subscribing to events before starting reading data from websocket - cd37171 |
Errors occurring during the initialization of a WebSocket weren’t
notified to the WebSocketTransport that was leaking by returning
IsAlive = true forever