forked from clusterio/clusterio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix plugin hooks called before host removal (clusterio#607)
Due a bad order of operations when a host connection was closed the event handler listening on "close" to remove the host from the hostConnections mapping was added after the HostConnection's event handler listening on "close" and invoking plugin hooks in response to the host going offline. This in turn causes plugins that send broadcasts in repsonse to thos hooks to throw an error due to the broadcast sending code assuming connections that exist are valid target to send messages to. Fix by ordering the listener for the removal of the host connection before the listener invoking plugin events.
- Loading branch information
1 parent
a8ce8e7
commit 79c1a2d
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters