diff options
Diffstat (limited to 'src/mongo/executor')
-rw-r--r-- | src/mongo/executor/network_interface_asio_command.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/executor/network_interface_asio_command.cpp b/src/mongo/executor/network_interface_asio_command.cpp index b3e900478a5..db7ba556d26 100644 --- a/src/mongo/executor/network_interface_asio_command.cpp +++ b/src/mongo/executor/network_interface_asio_command.cpp @@ -305,8 +305,6 @@ void NetworkInterfaceASIO::_completeOperation(AsyncOp* op, const ResponseStatus& _numSucceededOps.fetchAndAdd(1); } - op->finish(resp); - std::unique_ptr<AsyncOp> ownedOp; { @@ -321,6 +319,8 @@ void NetworkInterfaceASIO::_completeOperation(AsyncOp* op, const ResponseStatus& _inProgress.erase(iter); } + op->finish(resp); + MONGO_ASIO_INVARIANT(static_cast<bool>(ownedOp), "Invalid AsyncOp", op); auto conn = std::move(op->_connectionPoolHandle); |