summaryrefslogtreecommitdiff
path: root/src/mongo/util
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2018-02-14 17:27:55 -0500
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2018-02-14 17:27:55 -0500
commitf045ad4878ad035b0f66013367a2d7eb466bd95f (patch)
treeca162d2df7632b5d5d70bcd82c76bfc54f52ee91 /src/mongo/util
parentd8ba3098490e517fc8df166c43bc18d45a279dec (diff)
downloadmongo-f045ad4878ad035b0f66013367a2d7eb466bd95f.tar.gz
SERVER-30850 Handle replica set connection strings in startParallelShell()
(cherry picked from commit 284d80ba6ee928cdf3d8f23c161a7ee1bf4a8faf)
Diffstat (limited to 'src/mongo/util')
-rw-r--r--src/mongo/util/net/hostandport.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/util/net/hostandport.cpp b/src/mongo/util/net/hostandport.cpp
index abd8f2d6ade..4b46938fbdb 100644
--- a/src/mongo/util/net/hostandport.cpp
+++ b/src/mongo/util/net/hostandport.cpp
@@ -95,7 +95,9 @@ void HostAndPort::append(StringBuilder& ss) const {
} else {
ss << host();
}
- ss << ':' << port();
+ if (host().find('/') == std::string::npos) {
+ ss << ':' << port();
+ }
}
bool HostAndPort::empty() const {