diff --git a/lib/core/connection/pool.js b/lib/core/connection/pool.js index 8e20814223..318f5fbe42 100644 --- a/lib/core/connection/pool.js +++ b/lib/core/connection/pool.js @@ -273,7 +273,9 @@ function connectionFailureHandler(pool, event, err, conn) { // No more socket available propegate the event if (pool.socketCount() === 0) { if (pool.state !== DESTROYED && pool.state !== DESTROYING && pool.state !== DRAINING) { - stateTransition(pool, DISCONNECTED); + if (pool.options.reconnect) { + stateTransition(pool, DISCONNECTED); + } } // Do not emit error events, they are always close events