novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 466 forks source link

sessionManager.disconnect not working #422

Closed RajaReddyiOS closed 6 years ago

RajaReddyiOS commented 6 years ago

if user tap logout button am calling disconnect function (sessionManager.disconnect). already added will message has "offline" with keepAlive has 60seconds. But After disconnecting mqtt broker its showing has "Offline"...

but when i turn of internet connection at that moment will message returning properly has "Offline"

for mqtt Connection am using this constructor..

sessionManager?.connect(to: host, 
                                                   port: port,
                                                   tls: true, 
                                                   keepalive: 60, 
                                                   clean: true, 
                                                   auth: true, 
                                                   user: userName, 
                                                   pass: password, 
                                                   willTopic: connectivityTopic, 
                                                   will: message, 
                                                   willQos: MQTTQosLevel.atMostOnce, 
                                                   willRetainFlag: true, 
                                                   withClientId: userName)

let me know is am missing any thing..

jcavar commented 6 years ago

@RajaReddyiOS do you still have this issue? Can you explain more in detail?

jcavar commented 6 years ago

Closing because there was not activity. Feel free to reopen with more info.