mgdm / Mosquitto-PHP

A wrapper for the Eclipse Mosquitto™ MQTT client library for PHP.
BSD 3-Clause "New" or "Revised" License
528 stars 146 forks source link

Can't Clear Session #86

Closed devilwacause closed 6 years ago

devilwacause commented 6 years ago

Can't Clear Session.

My application requires that when a user is added a Client is created with clean session set to false and presubscribe to topics that are determined by the user role.

<<<< That works fine. Even the update to topics if the user role changes works (both unsubscribe and subscribe).

What fails is upon user deletion I set connection with the Client to clean session true - and it does not change the session state of the client at the broker, nor do unsubscribes work. I can manually remove the user and topics by subbing to them with a clean session state using the console and mosquitto_sub.

Any ideas?

devilwacause commented 6 years ago

Was problem in another piece of my code that became apparent only after doing some line by line commenting. I'll admit it didn't make sense from the start.

Closing.