Fix onExit not being invoked if plugin load fails

Fix instance not properly exiting if an error occurs during the loading
of a plugin.
This commit is contained in:
Hornwitser committed 2020-05-08 18:15:17 +02:00
1 parent 1beffb1bfd
commit b8b8c44083
2 files changed
+22 -10

No files matched your search

+5 -1
View File
@@ -73,7 +73,11 @@ class BaseInstancePlugin {
async onStop() { }
/**
* Called when the Factorio server exited
* Called when the instance exits
*
* Invoked when the instance is shut down. This may occur after init
* has been called if an error occurs during startup. Note that if
* the plugin's init() throws this method will still be invoked.
*/
onExit() { }