question: public void connectionLost ( ) throws MqttException { boolean reconnected = false ; synchronized ( connLock ) { while ( ! reconnected && ! connLockNotified ) { try { wmqttClient . connect ( ) ; reconnected = true ; } catch ( MqttException mqe ) { if ( userConnect ) { throw mqe ; } } try { connLock . wait ( 2000 ) ; } catch ( InterruptedException ie ) { } } connLockNotified = false ; } if ( reconnected ) { try { String requestTopic [ ] = { REQ_TOPIC } ; wmqttClient . subscribe ( requestTopic , subQoS ) ; } catch ( MqttException e ) { disconnectClient ( ) ; destroyClient ( ) ; throw e ; } } }
target:  This reconnects to the broker and resubscribes in the event of the mqttv3 connection unexpectedly breaking.