diff options
Diffstat (limited to 'src/mongo/util/net')
-rw-r--r-- | src/mongo/util/net/sock.cpp | 4 | ||||
-rw-r--r-- | src/mongo/util/net/sock.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/util/net/sock.cpp b/src/mongo/util/net/sock.cpp index 3a42470524a..35776fe4c73 100644 --- a/src/mongo/util/net/sock.cpp +++ b/src/mongo/util/net/sock.cpp @@ -299,13 +299,13 @@ SSLPeerInfo Socket::doSSLHandshake(const char* firstBytes, int len) { #endif -bool Socket::connect(const SockAddr& remote) { +bool Socket::connect(SockAddr& remote) { const Milliseconds connectTimeoutMillis(static_cast<int64_t>( _timeout > 0 ? std::min(kMaxConnectTimeoutMS, (_timeout * 1000)) : kMaxConnectTimeoutMS)); return connect(remote, connectTimeoutMillis); } -bool Socket::connect(const SockAddr& remote, Milliseconds connectTimeoutMillis) { +bool Socket::connect(SockAddr& remote, Milliseconds connectTimeoutMillis) { _remote = remote; _fd = ::socket(remote.getType(), SOCK_STREAM, 0); diff --git a/src/mongo/util/net/sock.h b/src/mongo/util/net/sock.h index 7257e5e16f6..2548a46804c 100644 --- a/src/mongo/util/net/sock.h +++ b/src/mongo/util/net/sock.h @@ -109,12 +109,12 @@ public: * an error, or due to a timeout on connection, or due to the system socket deciding the * socket is invalid. */ - bool connect(const SockAddr& remote, Milliseconds connectTimeoutMillis); + bool connect(SockAddr& remote, Milliseconds connectTimeoutMillis); /** * Connect using a default connect timeout of min(_timeout * 1000, kMaxConnectTimeoutMS) */ - bool connect(const SockAddr& remote); + bool connect(SockAddr& remote); void close(); void send(const char* data, int len, const char* context); |