Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit a26805f

Browse files
committed
fix(connection): fixing leak in 3.0.0
1 parent d7cd5cd commit a26805f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/connection/connection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ Connection.prototype.connect = function(_options) {
600600
});
601601
self.connection.setTimeout(self.connectionTimeout);
602602
} else {
603-
self.connection.on('connect', function() {
603+
self.connection.once('connect', function() {
604604
// Set socket timeout instead of connection timeout
605605
self.connection.setTimeout(self.socketTimeout);
606606
// Emit connect event

0 commit comments

Comments
 (0)