Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const error = (frame) => {
switch (this.ws.readyState) {
case SockJS.CLOSING:
case SockJS.CLOSED:
this.reconnect();
break;
case SockJS.OPEN:
default:
console.log('FRAME ERROR', frame);
this.errorCallback(frame);
}
};
const headers = this.headers || {};
const error = (frame) => {
log('fsSocket error', this.socket)
switch (this.socket.readyState) {
case SockJS.CLOSING:
case SockJS.CLOSED:
runInAction(() => config.fsSocketConnected = false)
this.reconnect()
break
case SockJS.OPEN:
log('FRAME ERROR', frame)
break
default:
}
this.errorCallback(frame)
}