Close AsyncServerSocket sockets in reverse order
Summary: When a large number of processes concurrently bind and close `AsyncServerSocket`s with `port=0` (for example in tests) binding the IPv4 socket on the same port bound with the IPv6 socket can currently fail, because sockets are closed in the same order as they are opened, which makes the following scenario possible: ``` P0: close IPv6 port P1: open IPv6 port (succeed) P1: open IPv4 port (FAIL) P0: close IPv4 port ``` This diff reverses the closing order, and also fixes a couple of outdated comments. Reviewed By: philippv Differential Revision: D2795920 fb-gh-sync-id: 0b5157a56dfed84aed4a590c103050a2727847b3
Showing
Please register or sign in to comment