diff --git a/lib/core/sdam/server.js b/lib/core/sdam/server.js index 32767a2f5b..46ce8d2c34 100644 --- a/lib/core/sdam/server.js +++ b/lib/core/sdam/server.js @@ -467,6 +467,8 @@ function connectEventHandler(server) { return function(err, conn) { if (err) { server.emit('error', new MongoNetworkError(err)); + + stateTransition(this, STATE_CLOSED); server.emit('close'); return; }