aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--catbus.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/catbus.go b/catbus.go
index a3eb115..68dee1b 100644
--- a/catbus.go
+++ b/catbus.go
@@ -106,7 +106,7 @@ func (c *client) Subscribe(topic string, f MessageHandler) error {
return c.mqtt.Subscribe(topic, atLeastOnce, func(_ mqtt.Client, msg mqtt.Message) {
c.storePayload(msg.Topic(), Retention(msg.Retained()), string(msg.Payload()))
- f(c, messageFromMQTTMessage(msg))
+ go f(c, messageFromMQTTMessage(msg))
}).Error()
}