From 0f70b2c035d9bc39794571ea531f82880cb1d36a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Fri, 31 Jan 2025 17:27:35 -0500
Subject: [PATCH] Set sock to null *after* closing it.

---
 exec/broker.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/exec/broker.js b/exec/broker.js
index 96059c0cc4..eae29308d7 100644
--- a/exec/broker.js
+++ b/exec/broker.js
@@ -927,7 +927,6 @@ MQTT.Connection.prototype.tearDown = function() {
 		this.sock.clearOnce('write', this.tx_once);
 		this.tx_once = null;
 	}
-	this.sock = null;
 	sock.close();
 	this.sock = null;
 	if (this.broker.connected[this.client_id] !== undefined)
-- 
GitLab