Skip to content

Commit

Permalink
Fix streaming errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dengelke committed Oct 22, 2017
1 parent d6cd34e commit 52c6b1b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/read-stream.js
Expand Up @@ -65,9 +65,11 @@ stream._read = function () {

stream.destroy = function () {
var state = this._zoomState;
state.destroyed = true;
delete this._zoomState;
this.emit('close');
if (state && !state.destroyed) {
state.destroyed = true;
delete this._zoomState;
this.emit('close');
}
};

stream._getResultset = function () {
Expand Down

0 comments on commit 52c6b1b

Please sign in to comment.