Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

destroy only happens after close

  • Loading branch information...
commit 4f90420bcbe3d41c3f727d2c86d958d312d7e791 1 parent b18bbb7
@kilianc authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/nssocket.js
View
2  lib/nssocket.js
@@ -184,7 +184,6 @@ NsSocket.prototype.reconnect = function reconnect() {
function doReconnect() {
self.retry.waiting = true
- self.socket && self.socket.destroy()
// here for debugging reasons
assert.isFalse(self.connected, 'before actually reconnect connected must be false')
@@ -273,6 +272,7 @@ function configureEvents(self) {
}
self.socket.on('close', function onClose(hadError) {
+ self.socket.destroy()
self.socket = undefined
self.connected = false
Please sign in to comment.
Something went wrong with that request. Please try again.