public synchronized void disableAutomaticReconnection ( ) { if ( ! automaticReconnectEnabled ) { return ; } XMPPConnection connection = weakRefConnection . get ( ) ; if ( connection == null ) { throw new IllegalStateException ( "Connection instance no longer available" ) ; } connection . removeConnectionListener ( connectionListener ) ; automaticReconnectEnabled = false ; }
Disable the automatic reconnection mechanism . Does nothing if already disabled .