Skip to content

Commit

Permalink
Merge pull request #859 from Congelli501/patch-1
Browse files Browse the repository at this point in the history
Fix issue #711: close emitted before end
  • Loading branch information
sidorares authored Oct 14, 2018
2 parents 6953856 + ad92d20 commit 24c251c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/commands/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ class Query extends Command {
stream.emit('error', err); // Pass on any errors
});
this.on('end', function () {
stream.emit('close'); // notify readers that query has completed
stream.push(null); // pushing null, indicating EOF
stream.emit('close'); // notify readers that query has completed
});
this.on('fields', function (fields) {
stream.emit('fields', fields); // replicate old emitter
Expand Down

0 comments on commit 24c251c

Please # to comment.