Zigma

BOSH connection not closed while disconnect()

Discussion created by Zigma on Feb 25, 2015
Latest reply on Mar 10, 2015 by Zigma

As per the code Smack/XMPPBOSHConnection.java at master · igniterealtime/Smack · GitHub

 

at line number 290 there should be a client closing code

 

but the client close code only exists in the connect() function and no where else it is called

 

this leads the client to stay connected until the main thread terminates

 

Introduce a private function saying close()

and put

---------------------------

if (client != null) {

       client.close();

       client = null;

}

---------------------------

 

and call it at both connect() as well as shutdown() functions

Outcomes