提交 52d9bc3c authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

cosmetic

上级 c82f25a1
{"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../src/Channel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAmB9D,qBAAa,OAAQ,SAAQ,oBAAoB;IAGhD,OAAO,CAAC,OAAO,CAAS;IAGxB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IAGzC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IAGzC,OAAO,CAAC,OAAO,CAAK;IAGpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;IAGvD,OAAO,CAAC,WAAW,CAAC,CAAS;IAE7B;;OAEG;gBAEF,EACC,cAAc,EACd,cAAc,EACd,GAAG,EACH,EACD;QACC,cAAc,EAAE,GAAG,CAAC;QACpB,cAAc,EAAE,GAAG,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;KACZ;IAuHF;;OAEG;IACH,KAAK,IAAI,IAAI;IAmCb;;OAEG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA8D1E,OAAO,CAAC,eAAe;CAyDvB"}
\ No newline at end of file
{"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../src/Channel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAmB9D,qBAAa,OAAQ,SAAQ,oBAAoB;IAGhD,OAAO,CAAC,OAAO,CAAS;IAGxB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IAGzC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IAGzC,OAAO,CAAC,OAAO,CAAK;IAGpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;IAGvD,OAAO,CAAC,WAAW,CAAC,CAAS;IAE7B;;OAEG;gBAEF,EACC,cAAc,EACd,cAAc,EACd,GAAG,EACH,EACD;QACC,cAAc,EAAE,GAAG,CAAC;QACpB,cAAc,EAAE,GAAG,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;KACZ;IAoIF;;OAEG;IACH,KAAK,IAAI,IAAI;IAmCb;;OAEG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IA8D1E,OAAO,CAAC,eAAe;CAyDvB"}
\ No newline at end of file
......@@ -101,10 +101,10 @@ class Channel extends EnhancedEventEmitter_1.EnhancedEventEmitter {
}
}
});
this._consumerSocket.on('end', () => logger.debug('Consumer Channel ended by the worker process'));
this._consumerSocket.on('error', (error) => logger.error('Consumer Channel error: %s', String(error)));
this._producerSocket.on('end', () => logger.debug('Producer Channel ended by the worker process'));
this._producerSocket.on('error', (error) => logger.error('Producer Channel error: %s', String(error)));
this._consumerSocket.on('end', () => (logger.debug('Consumer Channel ended by the worker process')));
this._consumerSocket.on('error', (error) => (logger.error('Consumer Channel error: %s', String(error))));
this._producerSocket.on('end', () => (logger.debug('Producer Channel ended by the worker process')));
this._producerSocket.on('error', (error) => (logger.error('Producer Channel error: %s', String(error))));
}
/**
* @private
......
......@@ -98,7 +98,8 @@ export class Channel extends EnhancedEventEmitter
catch (error)
{
logger.error(
'invalid netstring data received from the worker process: %s', String(error));
'invalid netstring data received from the worker process: %s',
String(error));
// Reset the buffer and exit.
this._recvBuffer = undefined;
......@@ -144,13 +145,15 @@ export class Channel extends EnhancedEventEmitter
default:
// eslint-disable-next-line no-console
console.warn(
`worker[pid:${pid}] unexpected data: %s`, nsPayload.toString('utf8', 1));
`worker[pid:${pid}] unexpected data: %s`,
nsPayload.toString('utf8', 1));
}
}
catch (error)
{
logger.error(
'received invalid message from the worker process: %s', String(error));
'received invalid message from the worker process: %s',
String(error));
}
// Remove the read payload from the buffer.
......@@ -166,11 +169,21 @@ export class Channel extends EnhancedEventEmitter
}
});
this._consumerSocket.on('end', () => logger.debug('Consumer Channel ended by the worker process'));
this._consumerSocket.on('error', (error) => logger.error('Consumer Channel error: %s', String(error)));
this._consumerSocket.on('end', () => (
logger.debug('Consumer Channel ended by the worker process')
));
this._producerSocket.on('end', () => logger.debug('Producer Channel ended by the worker process'));
this._producerSocket.on('error', (error) => logger.error('Producer Channel error: %s', String(error)));
this._consumerSocket.on('error', (error) => (
logger.error('Consumer Channel error: %s', String(error))
));
this._producerSocket.on('end', () => (
logger.debug('Producer Channel ended by the worker process')
));
this._producerSocket.on('error', (error) => (
logger.error('Producer Channel error: %s', String(error))
));
}
/**
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论