We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54b3d51 commit 9398365Copy full SHA for 9398365
lib/querystream.js
@@ -182,7 +182,14 @@ function close(callback) {
182
// to allow _doneFetching to be emitted if needed.
183
self._closed = true;
184
185
- if (!self.isPaused()) {
+ // Node.js 0.10 didn't have an isPaused method that could be used to prevent
186
+ // an unnecessary pause event from being emitted (added in 0.11.14). We'll
187
+ // check for the existence of such a method and use it if possible, otherwise
188
+ // we'll just call pause. This could be simplified a little when support for
189
+ // Node.js 0.10 is dropped.
190
+ if (typeof self.isPaused === 'function' && !self.isPaused()) {
191
+ self.pause();
192
+ } else {
193
self.pause();
194
}
195
test/resultsetToQueryStream.js renamed to test/resultsetToStream.js
0 commit comments