ff14wed / deucalion

Injected Windows library for capturing decoded FFXIV packets
GNU General Public License v3.0
64 stars 6 forks source link

Ensure proper cleanup of subscribers #14

Closed ff14wed closed 1 year ago

ff14wed commented 1 year ago

In the case of server shutdown, this change ensures that we abort the tasks responsible for handling client connections before fully shutting down. This allows the named pipe connections to be dropped properly. (Fixes #13)

In the case of a client disconnection at any point in the message loop for the subscriber, the server will ensure that the disconnect is handled instead of exiting the subscriber handler immediately. This fixes a rare issue wherein the server does not exit when the last client disconnects because the disconnection happened while the server is sending a message to the subscriber.