File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ export default class SocketDaemon extends Daemon {
150150 }
151151 this . error . next ( 'plugin version incompatible' ) ;
152152 }
153+
154+ // Set channelOpen false for the first time
155+ if ( this . channelOpen . getValue ( ) === null ) {
156+ this . channelOpen . next ( false ) ;
157+ }
153158 return Promise . reject ( new Error ( `${ CANT_FIND_AGENT_MESSAGE } at ${ hostname } ` ) ) ;
154159 } ) ;
155160 }
@@ -234,11 +239,11 @@ export default class SocketDaemon extends Daemon {
234239 'Content-Type' : 'text/plain; charset=utf-8'
235240 }
236241 } ) . 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- } )
242+ . catch ( err => {
243+ if ( err . data && err . data . error && ( err . data . error . indexOf ( 'proxy' ) !== - 1 || err . data . error . indexOf ( 'dial tcp' ) !== - 1 ) ) {
244+ this . error . next ( 'proxy error' ) ;
245+ }
246+ } ) ;
242247 }
243248
244249 /**
You can’t perform that action at this time.
0 commit comments