-
Notifications
You must be signed in to change notification settings - Fork 692
/
restore-sigpipe-handler.patch
23 lines (19 loc) · 880 Bytes
/
restore-sigpipe-handler.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
See https://gitlab.alpinelinux.org/alpine/infra/infra/-/issues/10758
diff -upr lua-mqtt-publish-0.3.orig/mqtt/publish.lua lua-mqtt-publish-0.3/mqtt/publish.lua
--- lua-mqtt-publish-0.3.orig/mqtt/publish.lua 2022-06-12 12:09:12.127534562 +0200
+++ lua-mqtt-publish-0.3/mqtt/publish.lua 2022-06-12 12:15:41.038026395 +0200
@@ -1,6 +1,7 @@
--- @module mosquitto.publish
local mqtt = require("mosquitto")
+local signal = require("posix.signal")
local publish = {}
function publish.tls_set(cafile, capath, certfile, keyfile)
@@ -51,6 +52,9 @@ function publish.multiple(msgs, hostname
keepalive or publish.keepalive)
client:loop_forever()
client:destroy()
+
+ -- Workaround for https://github.com/eclipse/mosquitto/issues/2564
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
end
function publish.single(topic, payload, qos, retain, hostname, port, client_id,