File tree 1 file changed +10
-5
lines changed
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 {
150
150
}
151
151
this . error . next ( 'plugin version incompatible' ) ;
152
152
}
153
+
154
+ // Set channelOpen false for the first time
155
+ if ( this . channelOpen . getValue ( ) === null ) {
156
+ this . channelOpen . next ( false ) ;
157
+ }
153
158
return Promise . reject ( new Error ( `${ CANT_FIND_AGENT_MESSAGE } at ${ hostname } ` ) ) ;
154
159
} ) ;
155
160
}
@@ -234,11 +239,11 @@ export default class SocketDaemon extends Daemon {
234
239
'Content-Type' : 'text/plain; charset=utf-8'
235
240
}
236
241
} ) . 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
+ } ) ;
242
247
}
243
248
244
249
/**
You can’t perform that action at this time.
0 commit comments