Fix stop_mqtt_channel

This commit is contained in:
hehaijunandhenry 2026-05-08 17:21:25 +08:00
parent 2287de521e
commit 569939a7b3

View file

@ -213,7 +213,7 @@ func (c *MQTTChannel) Stop(_ context.Context) error {
logger.InfoC("mqtt", "Stopping MQTT channel")
c.SetRunning(false)
if c.client != nil && c.client.IsConnected() {
if c.client != nil {
c.client.Disconnect(500)
}