Skip to content
Snippets Groups Projects
Commit 0f70b2c0 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Set sock to null *after* closing it.

parent a7077e52
Branches
Tags
No related merge requests found
...@@ -927,7 +927,6 @@ MQTT.Connection.prototype.tearDown = function() { ...@@ -927,7 +927,6 @@ MQTT.Connection.prototype.tearDown = function() {
this.sock.clearOnce('write', this.tx_once); this.sock.clearOnce('write', this.tx_once);
this.tx_once = null; this.tx_once = null;
} }
this.sock = null;
sock.close(); sock.close();
this.sock = null; this.sock = null;
if (this.broker.connected[this.client_id] !== undefined) if (this.broker.connected[this.client_id] !== undefined)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment