summaryrefslogtreecommitdiff
path: root/src/mongo/shell
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@10gen.com>2017-05-25 15:33:35 -0400
committerRobert Guo <robert.guo@10gen.com>2017-05-30 14:51:48 -0400
commit7b112f71fe551e92ae0a365f62fff402d4158035 (patch)
tree0d20c64242f8ed35145eb3c9458487512174d62c /src/mongo/shell
parent3dc6ba1ad91727189c70ad41afdc446c76c81306 (diff)
downloadmongo-7b112f71fe551e92ae0a365f62fff402d4158035.tar.gz
SERVER-27549 Better check for when a server has shut down
Diffstat (limited to 'src/mongo/shell')
-rw-r--r--src/mongo/shell/servers.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index 69fecc2aab5..16e3ec4ebc0 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -849,6 +849,11 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
"it is usually the object returned from MongoRunner.runMongod/s");
}
+ if (!conn.port) {
+ throw new Error("first arg must have a `port` property; " +
+ "it is usually the object returned from MongoRunner.runMongod/s");
+ }
+
signal = parseInt(signal) || 15;
opts = opts || {};