shehankonecranes / sp-react-native-mqtt

MQTT Client native module for react-native
68 stars 55 forks source link

Fix clear eventHandler when removeClient #31

Open hat-iparamed opened 1 year ago

hat-iparamed commented 1 year ago

Context

My app has a use case to clear all MQTT client on logout and re-create the client when login again.

But when removeClient the check if(this.clients.length > 0) always return false, therefore it won't remove the eventHandler resulting when I create new client it could not set up MQTT events again.