Skip to content

Commit

Permalink
fix(server): emit "first connect" error if initial connect fails due …
Browse files Browse the repository at this point in the history
…to ECONNREFUSED (#2016)
  • Loading branch information
vkarpov15 authored and daprahamian committed Aug 13, 2019
1 parent 3a1fdc1 commit 5a7b15b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/topologies/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ var eventHandler = function(self, event) {

// On first connect fail
if (
self.s.pool.state === 'disconnected' &&
['disconnected', 'connecting'].indexOf(self.s.pool.state) !== -1 &&
self.initialConnect &&
['close', 'timeout', 'error', 'parseError'].indexOf(event) !== -1
) {
Expand Down

0 comments on commit 5a7b15b

Please sign in to comment.