We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3d4ae51 + 1c17177 commit be73773Copy full SHA for be73773
lib/pool.js
@@ -30,7 +30,13 @@ var pools = {
30
//via the pg object and then removing errored client from the pool
31
client.on('error', function(e) {
32
pool.emit('error', e, client);
33
- pool.destroy(client);
+
34
+ // If the client is already being destroyed, the error
35
+ // occurred during stream ending. Do not attempt to destroy
36
+ // the client again.
37
+ if (!client._destroying) {
38
+ pool.destroy(client);
39
+ }
40
});
41
42
// Remove connection from pool on disconnect
0 commit comments