this.persistence.close(); this.topics = new Hashtable();
/** * After a successful disconnect, the underlying library objects need to be closed and connection observers want to * be notified. * * @param v A passthrough boolean value * @return Returns the value of the parameter v. */ protected boolean finalizeStopAfterDisconnect(boolean v) { if (client != null) { try { client.close(); } catch (Exception ignore) { } } client = null; if (dataStore != null) { try { dataStore.close(); } catch (Exception ignore) { } dataStore = null; } connectionObservers.forEach(o -> o.connectionStateChanged(MqttConnectionState.DISCONNECTED, null)); return v; }
persistence.close();
this.persistence.close(); this.topics = new Hashtable();
this.persistence.close(); this.topics = new Hashtable();
this.persistence.close(); this.topics = new Hashtable();
void close() { // Disconnect. retryInterval = 0; if (mqtt.isConnected()) { try { mqtt.disconnect(); } catch (MqttException exception) { exception.printStackTrace(); } } // Close MQTT. try { mqtt.close(); } catch (MqttException exception) { exception.printStackTrace(); } // Close persistence. try { persistence.close(); } catch (MqttPersistenceException exception) { exception.printStackTrace(); } // Remove all nodes. for (CloudioNode.InternalNode node: nodes) { node.close(); } nodes.clear(); }
if (persistence != null) {persistence.close();} }catch(Exception ex) {
persistence.close();
persistence.close();