Fix usage of logger in FactorioServer

Fix incorrect usage of the global logger, and typo'd use of the _logger
property in FactorioServer.
This commit is contained in:
Hornwitser committed 2020-12-28 07:03:32 +01:00
1 parent 35cb9f8698
commit 29a3c26b44
1 file changed
+2 -2
+2 -2
View File
@@ -637,7 +637,7 @@ class FactorioServer extends events.EventEmitter {
}
if (!this.emit(`ipc-${channel}`, content)) {
this.logger.warn(`Warning: Unhandled ipc-${channel}`, { content });
this._logger.warn(`Warning: Unhandled ipc-${channel}`, { content });
}
}
@@ -976,7 +976,7 @@ class FactorioServer extends events.EventEmitter {
let timeoutId = setTimeout(() => {
if (hanged) {
logger.error("Factorio appears to have hanged, sending SIGKILL");
this._logger.error("Factorio appears to have hanged, sending SIGKILL");
if (this._rconClient) {
this._rconClient.end().catch(() => {});
}