Skip to content

Commit

Permalink
fix(topology): don't emit server closed event on network error
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Oct 9, 2019
1 parent 2b6a359 commit 194dcf0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/core/sdam/topology.js
Original file line number Diff line number Diff line change
Expand Up @@ -930,13 +930,8 @@ function serverConnectEventHandler(server, topology) {
};
}

function serverErrorEventHandler(server, topology) {
function serverErrorEventHandler(server /*, topology */) {
return function(err) {
topology.emit(
'serverClosed',
new monitoring.ServerClosedEvent(topology.s.id, server.description.address)
);

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

0 comments on commit 194dcf0

Please sign in to comment.