From 4491321975e6f6bc5aac5d1b2548fa1c297d5159 Mon Sep 17 00:00:00 2001 From: Cornelius Suermann Date: Sat, 17 Aug 2024 06:24:25 +0200 Subject: [PATCH] fix(MQTT): Keep using IPv4 instead of IPv6 --- .gitignore | 2 +- MqttClient.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f5d8a95..6066d8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .DS_Store -node_modules +node_modules* test.js .vscode/launch.json diff --git a/MqttClient.js b/MqttClient.js index f7b5e8e..62467d0 100644 --- a/MqttClient.js +++ b/MqttClient.js @@ -14,6 +14,7 @@ class MqttClient extends EventEmitter { resubscribe: false, clean: true, protocolVersion: 5, + family: 4, //Version of IP stack. Must be 4, 6, or 0. The value 0 indicates that both IPv4 and IPv6 addresses are allowed. Default: 0. } this.client = null