Skip to content

Commit

Permalink
fix: terminate hooks handler if unable to connect
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Jun 26, 2019
1 parent fe215f1 commit f2b2609
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/HooksWorkerClient.js
Expand Up @@ -40,7 +40,10 @@ class HooksWorkerClient {

logger.debug('Connecting to hooks handler.');
this.connectToHandler((connectHandlerError) => {
if (connectHandlerError) { return callback(connectHandlerError); }
if (connectHandlerError) {
this.terminateHandler(terminateError => callback(connectHandlerError || terminateError));
return;
}

logger.debug('Registering hooks.');
this.registerHooks((registerHooksError) => {
Expand Down

0 comments on commit f2b2609

Please sign in to comment.