pg-copy-streams
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -30,5 +30,11 @@ 'use strict'; | ||
CopyStreamQuery.prototype._detach = function() { | ||
this.connection.stream.unpipe(this) | ||
// Unpipe can drop us out of flowing mode | ||
this.connection.stream.resume() | ||
var connectionStream = this.connection.stream | ||
connectionStream.unpipe(this) | ||
// unpipe can pause the stream but also underlying onData event can potentially pause the stream because of hitting | ||
// the highWaterMark and pausing the stream, so we resume the stream in the next tick after the underlying onData | ||
// event has finished | ||
process.nextTick(function () { | ||
connectionStream.resume() | ||
}) | ||
} | ||
@@ -35,0 +41,0 @@ |
{ | ||
"name": "pg-copy-streams", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Low-Level COPY TO and COPY FROM streams for PostgreSQL in JavaScript using", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -110,2 +110,6 @@ ## pg-copy-streams | ||
### version 2.2.2 - published 2019-07-22 | ||
* Bugfix copy-to could pause the client connection, preventing re-use | ||
### version 2.2.1 - published 2019-07-22 | ||
@@ -112,0 +116,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23230
414
167