Skip to content

Commit

Permalink
Patch: Connection stuck after a while (#738)
Browse files Browse the repository at this point in the history
* Update connection.js
  • Loading branch information
wackfx authored Nov 26, 2023
1 parent 61c4d5b commit 6f20a48
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,8 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
lifeTimer.cancel()
connectTimer.cancel()

if (socket.encrypted) {
socket.removeAllListeners()
socket = null
}
socket.removeAllListeners()
socket = null

if (initial)
return reconnect()
Expand Down

0 comments on commit 6f20a48

Please sign in to comment.