diff options
Diffstat (limited to 'src/mongo/executor/network_interface_asio.cpp')
-rw-r--r-- | src/mongo/executor/network_interface_asio.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/executor/network_interface_asio.cpp b/src/mongo/executor/network_interface_asio.cpp index 84028a95194..d70acd649a5 100644 --- a/src/mongo/executor/network_interface_asio.cpp +++ b/src/mongo/executor/network_interface_asio.cpp @@ -259,10 +259,12 @@ void NetworkInterfaceASIO::startCommand(const TaskExecutor::CallbackHandle& cbHa // timeout duration - but make no stronger assumption. It is thus possible that // we have already exceeded the timeout. In this case we timeout the operation // manually. - return _completeOperation(op, - {ErrorCodes::ExceededTimeLimit, - "Remote command timed out while waiting to get a " - "connection from the pool."}); + std::stringstream msg; + msg << "Remote command timed out while waiting to get a connection from the " + << "pool, took " << getConnectionDuration << ", timeout was set to " + << op->_request.timeout; + auto rs = ResponseStatus(ErrorCodes::ExceededTimeLimit, msg.str()); + return _completeOperation(op, rs); } // The above conditional guarantees that the adjusted timeout will never underflow. |