mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Warn on unhandled Factorio ipc
Send warning to console if an ipc message is received but there were no handlers registered to handle it.
This commit is contained in:
1 parent
c2df80a17f
commit
3ff5e630ca
1 file changed
+3
-1
@@ -505,7 +505,9 @@ class FactorioServer extends events.EventEmitter {
|
|||||||
throw new Error(`Unknown IPC type '${type}'`);
|
throw new Error(`Unknown IPC type '${type}'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emit(`ipc-${channel}`, content);
|
if (!this.emit(`ipc-${channel}`, content)) {
|
||||||
|
console.warn(`Warning: Unhandled ipc-${channel}`, content);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_handleOutput(line, source) {
|
_handleOutput(line, source) {
|
||||||
|
|||||||
Reference in new issue
Block a user