Bug fix for C++ TSocketPool
authorDavid Reiss <dreiss@apache.org>
Fri, 29 Feb 2008 07:33:47 +0000 (07:33 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 29 Feb 2008 07:33:47 +0000 (07:33 +0000)
Wasn't setting the host or port for each server in the pool on open.

Reviewed By: dbraginsky

Test Plan: Just compiled.  Will test with dbraginsky's server.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665535 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/transport/TSocketPool.cpp

index af7303b..6398052 100644 (file)
@@ -121,6 +121,9 @@ void TSocketPool::open() {
     bool retryIntervalPassed = (server.lastFailTime_ == 0);
     bool isLastServer = alwaysTryLast_ ? (i == (numServers - 1)) : false;
 
+    host_ = server.host_;
+    port_ = server.port_;
+
     if (server.lastFailTime_ > 0) {
       // The server was marked as down, so check if enough time has elapsed to retry
       int elapsedTime = time(NULL) - server.lastFailTime_;