Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(pool): ensure noResponse callback is only called if cb exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Apr 9, 2018
1 parent 6ff7171 commit 5281605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connection/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ function _execute(self) {
}

// if the command is designated noResponse, call the callback immeditely
if (workItem.noResponse) {
if (workItem.noResponse && typeof workItem.cb === 'function') {
workItem.cb(null, { result: { ok: 1 } });
}

Expand Down

0 comments on commit 5281605

Please sign in to comment.