If a server is started and then quickly shutdown, there's a chance that it may trigger the following invariant: https://github.com/10gen/mongo/blob/8e8e6658eecd1d1a9b76d073bbcff272a8056be9/src/mongo/transport/asio/asio_transport_layer.cpp#L1229
This because setup will add acceptor records, but shutdown will change the listener state such that the ingress branch is not taken, leading to the invariant being checked. We should split the condition so that even if the listener state is not kNew, we don't check for this invariant.
- is caused by
-
SERVER-84241 AsioTransportLayer::stopAcceptingSessions can deadlock if called before listener thread started listening
- Closed