diff options
author | Robert Guo <robert.guo@10gen.com> | 2017-05-25 15:33:35 -0400 |
---|---|---|
committer | Robert Guo <robert.guo@10gen.com> | 2017-05-30 14:51:48 -0400 |
commit | 7b112f71fe551e92ae0a365f62fff402d4158035 (patch) | |
tree | 0d20c64242f8ed35145eb3c9458487512174d62c /src/mongo/shell | |
parent | 3dc6ba1ad91727189c70ad41afdc446c76c81306 (diff) | |
download | mongo-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.js | 5 |
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 || {}; |