Skip to content
Snippets Groups Projects
Commit 921b797b authored by yamadapc's avatar yamadapc
Browse files

Reconnect when the WS connection closes

parent 5b746b93
No related branches found
No related tags found
No related merge requests found
...@@ -69,8 +69,9 @@ class Steem extends EventEmitter { ...@@ -69,8 +69,9 @@ class Steem extends EventEmitter {
const releaseClose = this.listenTo(this.ws, 'close', () => { const releaseClose = this.listenTo(this.ws, 'close', () => {
debugWs('Closed WS connection with', url); debugWs('Closed WS connection with', url);
releaseClose();
this.isOpen = false; this.isOpen = false;
this.stop();
this.start();
}); });
const releaseMessage = this.listenTo(this.ws, 'message', (message) => { const releaseMessage = this.listenTo(this.ws, 'message', (message) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment