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

Commit 5281605

Browse files
committed
fix(pool): ensure noResponse callback is only called if cb exists
1 parent 6ff7171 commit 5281605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/connection/pool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ function _execute(self) {
15711571
}
15721572

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

0 commit comments

Comments
 (0)