Connecting to Bitsocket with NodeJS? Here a simple solution to deal with disconnect issues, try using Reconnecting-eventsource (https://www.npmjs.com/package/reconnecting-eventsource) in place of EventSource library.
To use it, just replace:
```
var es = new EventSource(url);
```
with:
```
var es = new ReconnectingEventSource(url);
```
For an example, we use it here (https://github.com/interplanaria/bitcache/blob/master/bitsocket.js#L20-L29) in Bitcache to make sure no event are missed.
Connecting to Bitsocket with NodeJS? Here a simple solution to deal with disconnect issues, try using Reconnecting-eventsource (https://www.npmjs.com/package/reconnecting-eventsource) in place of EventSource library.
To use it, just replace:
```
var es = new EventSource(url);
```
with:
```
var es = new ReconnectingEventSource(url);
```
For an example, we use it here (https://github.com/interplanaria/bitcache/blob/master/bitsocket.js#L20-L29) in Bitcache to make sure no event are missed.