eclipse / paho.mqtt.m2mqtt

Eclipse Public License 1.0
512 stars 303 forks source link

Disconnect message not being sent #85

Closed marwan87 closed 6 years ago

marwan87 commented 6 years ago

On disconnect the clinet doesnt seem to be publishing the will and testement message. I think it might be linked to issue 84 but it might not be.

client.Connect(config.Mqtt.ClientId, username: null, password: null,
                willRetain: RetainMessage,
                willQosLevel: QualityOfService,
                willFlag: true,
                willTopic: finalMessage.Topic,
                willMessage: finalMessage.Message,
                cleanSession: true,
                keepAlivePeriod: (ushort) KeepAlivePeriod.TotalSeconds);

the clean session cannot be false, as we use AWS and that has to be set to true for it to work. Is anyone else facing this issue?