I'm using MQTT in an android application, using the latest jar as found on the Eclipse Paho page.

I'm manually checking the connection by sending occasional publishes under a QOS of 1, and if it's not delivered under a certain timeout I disconnect MQTT and reconnect. When the data connection is lost then regained I also force a reconnect.

The issue is that the disconnect method hangs the thread and never completes - even with a zero or negative timeout. It's supposed to have an internal timeout of 30 seconds but it goes long past this and never completes.

The MqttClient object needs to be disconnected otherwise it sits in the background chewing up data. What I'm now doing is spinning off a seperate thread to disconnect MQTT then creating a new MqttClient entirely. It stops using data but it's a bad solution as the new thread just hangs instead.

Any ideas?

Edit:
On further investigation it seems to be blocking on attempting to stop CommsReceiver at line 70:

```
public void stop() throws IOException {
    synchronized (lifecycle) {
        //@TRACE 850=stopping receiver
        trace.trace(Trace.FINE,850);
        if (running) {
            running = false;
            try {
                //@TRACE 851=stop: wait on lifecycle
                trace.trace(Trace.FINE,851);
                // Wait for the thread to finish.
                lifecycle.wait(); // THREAD HANGS //
            }
            catch (InterruptedException ex) {
            }
        }
    }
}

```