afrad / angular2-websocket

Websocket wrapper for angular2 based on angular-websocket
Apache License 2.0
210 stars 84 forks source link

interrupt reConnect if websocket is closed #93

Closed mburger81 closed 6 years ago

mburger81 commented 6 years ago

If the websocket is interrupted and we reconnect it trought reconnectIfNotNormalClose parameter, after closing the websocket manually in the background the setTimout and the reconnecting logic is always present and it tries to reconnect it to websocket.

This change is setting on manually close method the reconnectIfNotNormalClose to false and the timeout logic is handling the status of the paramter.

mburger81 commented 6 years ago

Resolves issue #87