Skip to content

Commit 0514d8d

Browse files
author
smellai
committed
added proxy error
1 parent dd8698c commit 0514d8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/socket-daemon.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ export default class SocketDaemon extends Daemon {
233233
headers: {
234234
'Content-Type': 'text/plain; charset=utf-8'
235235
}
236-
}).then(() => Promise.reject()); // We reject the promise because the daemon will be restarted, we need to continue looking for the port
236+
}).then(() => Promise.reject()) // We reject the promise because the daemon will be restarted, we need to continue looking for the port
237+
.catch(err => {
238+
if (err.data && err.data.error && (err.data.error.indexOf('proxy') !== -1 || err.data.error.indexOf('dial tcp') !== -1)) {
239+
this.error.next('proxy error');
240+
}
241+
})
237242
}
238243

239244
/**

0 commit comments

Comments
 (0)