summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2008-12-19 11:19:35 -0500
committerAaron <aaron@10gen.com>2008-12-19 11:19:35 -0500
commit81b17c9344d56bbc73f18ac910f0ae405fea8718 (patch)
tree4a8480c7ac03c6f06d968b0a4ce050ab5beccfe9 /client
parent62253080eb744d0b668f2b1175a28b429ef3169e (diff)
downloadmongo-81b17c9344d56bbc73f18ac910f0ae405fea8718.tar.gz
Log port number when connect fails
Diffstat (limited to 'client')
-rw-r--r--client/dbclient.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/dbclient.cpp b/client/dbclient.cpp
index eefa3e13c25..18a323bba99 100644
--- a/client/dbclient.cpp
+++ b/client/dbclient.cpp
@@ -73,7 +73,9 @@ bool DBClientConnection::connect(const char *_serverAddress, string& errmsg) {
p = auto_ptr<MessagingPort>(new MessagingPort());
if( !p->connect(*server) ) {
- errmsg = string("couldn't connect to server ") + serverAddress + ' ' + ip;
+ stringstream ss;
+ ss << "couldn't connect to server " << serverAddress << " " << ip << ":" << port;
+ errmsg = ss.str();
failed = true;
return false;
}