Skip to content

Commit

Permalink
refactor: server trampoline should always indicate pool is opened
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Dec 30, 2019
1 parent e38fa85 commit 509a118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cmap/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function makeServerTrampoline(connection) {
clusterTime: connection[kClusterTime],
s: {
bson: connection.bson,
pool: { write: write.bind(connection) }
pool: { write: write.bind(connection), isConnected: () => true }
}
};
}
Expand Down Expand Up @@ -223,7 +223,7 @@ function messageHandler(conn) {
return;
}

if (document.ok === 0 || document.$err || document.errmsg || document.code) {
if (document.ok === 0 || document.$err || document.errmsg) {
callback(new MongoError(document));
return;
}
Expand Down

0 comments on commit 509a118

Please sign in to comment.