From dd197ac84a0b6a25ab8228c210bac4d9f3f6560b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Fri, 31 Jan 2025 15:50:28 -0500
Subject: [PATCH] After receiving all packet data, receive the next packet.

This appears to be why it was hanging. :D
---
 exec/broker.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/exec/broker.js b/exec/broker.js
index 6ba413d0b3..6083e92114 100644
--- a/exec/broker.js
+++ b/exec/broker.js
@@ -1923,6 +1923,8 @@ MQTT.Packet.newBytes = function() {
 		}
 		if (this.connection.rx_need)
 			this.connection.rx_once = this.once('read', MQTT.Packet.newBytes);
+		else
+			this.connection.rx_once = this.once('read', MQTT.Connection.rxPacket);
 	}
 	catch (e) {
 		this.connection.error(e);
-- 
GitLab