Skip to content

Commit

Permalink
fix(sdam): ignore server errors when closing/closed
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Nov 5, 2019
1 parent 62ada2a commit 49d7235
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/core/sdam/topology.js
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,12 @@ function serverConnectEventHandler(server, topology) {
};
}

function serverErrorEventHandler(server /*, topology */) {
function serverErrorEventHandler(server, topology) {
return function(err) {
if (topology.s.state === STATE_CLOSING || topology.s.state === STATE_CLOSED) {
return;
}

if (isSDAMUnrecoverableError(err, server)) {
resetServerState(server, err, { clearPool: true });
return;
Expand Down

0 comments on commit 49d7235

Please sign in to comment.