mobile-web-messaging / MQTTKit

MQTT Objective-C client for iOS
Apache License 2.0
462 stars 226 forks source link

Unable to retain session when a new client is initialized with same client id #21

Closed kirang89 closed 10 years ago

kirang89 commented 10 years ago

Currently a session is not retained when an MQTTClient object is reinitialized with the same client id and then connected to the broker. So for example, if I terminate my app, the session bound to the client object gets destroyed and I will no longer receive any offline messages.

Is there any workaround for this ?

kirang89 commented 10 years ago

Never mind. Setting the message handler for the client after subscribing to the channel was the cause of this issue.