Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close_socket acquires _socket_lock, and calling it with the lock held deadlocks. On top of this the warning did not prove very useful, as it would also trigger when the application is sending metrics from another thread when the process forks, in which case the warning is a bit misleading. Without the warning there is no reason to check for socket being open, so just silently call close_socket() after the fork to avoid sharing the file descriptor between processes if another thread re-opened it between pre_fork() and fork itself.
- Loading branch information