Skip to content

Commit

Permalink
Merge pull request #222 from IanMcCurdy/checkQueueUndefinedInCreatetask
Browse files Browse the repository at this point in the history
Raise error if _queue undefined in enqueue
  • Loading branch information
IanMcCurdy committed Nov 23, 2023
2 parents 55bc11b + c18ad87 commit 811e3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/protocol/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Connection.prototype.receive = function receive(buffer, cb) {
Connection.prototype.enqueue = function enqueue(task, cb) {
var queueable;

if (!this._socket) {
if (!this._socket || !this._queue) {
var err = new Error('Connection closed');
err.code = 'EHDBCLOSE';
return cb(err);
Expand Down

0 comments on commit 811e3e7

Please sign in to comment.