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 workItem is not null before accessing properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Dec 1, 2017
1 parent 6510d7d commit 2143963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connection/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ function messageHandler(self) {

// Reset the connection timeout if we modified it for
// this operation
if (workItem.socketTimeout) {
if (workItem && workItem.socketTimeout) {
connection.resetSocketTimeout();
}

Expand Down Expand Up @@ -536,7 +536,7 @@ function messageHandler(self) {
}

// Time to dispatch the message if we have a callback
if (!workItem.immediateRelease) {
if (workItem && !workItem.immediateRelease) {
try {
// Parse the message according to the provided options
message.parse(workItem);
Expand Down

0 comments on commit 2143963

Please sign in to comment.