Closed outaTiME closed 5 years ago
Hi,
Thanks for reporting. Fixed in 4.1.6
Let me know if you find any other issue
wooow, awesome @pladaria, now it works as expected thanks for your time, really appreciated 🎉
even you add a missing else
statement to make disconnection when websocket is already connected.
Thanks once again !!!
Hi, I've been using you lib for a long time, but today I made some updates in my code to force close on websocket active instance, but when I try to reconnect I have no luck.
Looking the code the
_closeCalled
flag is stilltrue
, probably thereconnect
method may set it tofalse
.https://github.com/pladaria/reconnecting-websocket/blob/master/reconnecting-websocket.ts#L360
I'm using this in react-native environment, basically my code close websocket instance when app goes to background and reconnects when app goes to foreground, so here is the piece of code (
websocketConnect
method called when app in foreground / first time,websocketDisconnect
on background):Thanks !!!