joewalnes / reconnecting-websocket

A small decorator for the JavaScript WebSocket API that automatically reconnects
MIT License
4.21k stars 970 forks source link

Will this library automatically send heartbeat packets? 请问这个库会自动发送心跳包吗? #118

Open kKevin0001 opened 3 years ago

kKevin0001 commented 3 years ago

Will this library automatically send heartbeat packets? 请问这个库会自动发送心跳包吗?

myan0020 commented 1 year ago

As far as I know, the answer is NO. This library will not send any heartbeat messages when websocket's readyState is WebSocket.OPEN, and it only attemps to create a new websocket connection when the previous websocket connection's onclose is called.