public boolean disconnectClient() throws MqttException {
synchronized (connLock) {
    connLockNotified=true;
    connLock.notify();
  }
  try {
    wmqttClient.disconnect();
  }
 catch (  MqttPersistenceException mqpe) {
  }
  connected=false;
  return true;
}

public boolean disconnectClient ( ) throws MqttException { synchronized ( connLock ) { connLockNotified = true ; connLock . notify ( ) ; } try { wmqttClient . disconnect ( ) ; } catch ( MqttPersistenceException mqpe ) { } connected = false ; return true ; }
disconnectclient stops any connectionlost processing that is happening and disconnects the tcp / ip socket connection .
