-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically drop all connections after fork (#166)
* Automatically drop all connections after fork Fix: #165 Using connections inherited from a parent process can have very nasty consequences and it's pretty much never desired. This patch use the `Process._fork` API added in Ruby 3.1 to automatically detect when a fork is happening, and when it does, drop all existing connections. * after_fork callback: keep instances in a weakref set This is much faster than relying on `ObjectSpace.each_object` Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
- Loading branch information
1 parent
a8bc713
commit 428c06f
Showing
2 changed files
with
83 additions
and
3 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