diff options
Diffstat (limited to 'src/mongo/db/repl/connections.h')
-rw-r--r-- | src/mongo/db/repl/connections.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/mongo/db/repl/connections.h b/src/mongo/db/repl/connections.h index eadf4e92d49..62eb727ed4a 100644 --- a/src/mongo/db/repl/connections.h +++ b/src/mongo/db/repl/connections.h @@ -130,25 +130,8 @@ namespace repl { const std::string _hostport; // we should already be locked... - bool connect() { - std::string err; - if (!connInfo->cc->connect(HostAndPort(_hostport), err)) { - log() << "couldn't connect to " << _hostport << ": " << err << rsLog; - return false; - } - connInfo->connected = true; - connInfo->tagPort(); - - // if we cannot authenticate against a member, then either its key file - // or our key file has to change. if our key file has to change, we'll - // be rebooting. if their file has to change, they'll be rebooted so the - // connection created above will go dead, reconnect, and reauth. - if (getGlobalAuthorizationManager()->isAuthEnabled()) { - return authenticateInternalUser(connInfo->cc.get()); - } - - return true; - } + bool connect(); + }; inline ScopedConn::ScopedConn(const std::string& hostport) : _hostport(hostport) { |