robtaussig / react-use-websocket

React Hook for WebSocket communication
MIT License
1.62k stars 135 forks source link

Having hard time closing connection #252

Open serafxxx opened 1 week ago

serafxxx commented 1 week ago

Is it normal to see a lot of zombie (?) connections (status 101, but messages not coming through) in chrome inspector?

I expect ws connection to close on unmount, but after unmount ws connection persist (I can see it in chrome inspector in status 101). It seems that all those connections with status 101 are not really connected as messages wouldn't come through. I'm confused because if I'll try to create ws connection through browser api and close it, then I see connection as "finished" in dev tools. Everything else works as expected.