You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
In my application I have registered a handler for the ON_SHUTDOWN hook, which cleans up some network connections. During regular shutdown, the hook is executed fine, but when the daemon is automatically restarted, the hook is not called, resulting in lingering connections.
The reason for this is that the hook is dispatched from the destructor of the Daemon class, which in the case of an automatic restart is called when the exit call is made in the restart() method. Unfortunately, for non-intuitive reasons, right before the exit call is made, the array containing all the callbacks is cleared, so once the destructor runs, there aren't any hooks leftover to call.
The text was updated successfully, but these errors were encountered:
I see that this has been fixed in the more recent versions (2.1+). Could you please create a new tag for the stable versions, so packagist can pull them in? That makes it much easier to upgrade them. Thanks a lot!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In my application I have registered a handler for the ON_SHUTDOWN hook, which cleans up some network connections. During regular shutdown, the hook is executed fine, but when the daemon is automatically restarted, the hook is not called, resulting in lingering connections.
The reason for this is that the hook is dispatched from the destructor of the Daemon class, which in the case of an automatic restart is called when the
exit
call is made in therestart()
method. Unfortunately, for non-intuitive reasons, right before theexit
call is made, the array containing all the callbacks is cleared, so once the destructor runs, there aren't any hooks leftover to call.The text was updated successfully, but these errors were encountered: