Skip to content

Commit c900387

Browse files
author
Alberto Iannaccone
committed
disable socket reconnection
1 parent e739fc2 commit c900387

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/socket-daemon.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,15 @@ export default class SocketDaemon {
140140
* @return {Promise}
141141
*/
142142
wsConnect() {
143-
if (this.socket) {
143+
if (this.isConnected()) {
144144
return;
145145
}
146146

147147
const wsProtocol = this.selectedProtocol === PROTOCOL.HTTPS ? 'ws' : 'wss';
148148
const address = this.agentInfo[wsProtocol];
149-
this.socket = io(address);
149+
this.socket = io(address, { reconnection: false, forceNew: true });
150150

151151
this.socket.on('connect', () => {
152-
153152
initSocket(this.socket);
154153

155154
// On connect download windows drivers which are indispensable for detection of boards

0 commit comments

Comments
 (0)