-
Type:
Bug
-
Status: Closed
-
Priority:
Critical - P2
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Internal Code, Networking
-
Labels:None
-
Backwards Compatibility:Fully Compatible
-
Operating System:ALL
-
Backport Completed:
-
Epic Link:
-
Sprint:Platform 6 07/17/15
The waitUntilListening function uses a condition wait with a predicate based on the bool Listener::_ready. Unfortunately, this variable is not initialized in the constructor, meaning that its value is indeterminate. In the case where it is indeterminately a numeric value interpretable as 'false', callers to waitUntilListening will return immediately, before listening has actually started.
Note that repl::isSelf depends on the proper functioning of waitUntilListening, since otherwise it may attempt to connect before the socket is listening, leading to a false negative.