Quantcast
Channel: Ignite Realtime : Unanswered Discussions - Support
Viewing all articles
Browse latest Browse all 4979

XMPPTCPConnection.isAuthenticated() and XMPPTCPConnection.isConnected() both return true even the connection is lost

$
0
0

Hi,All

 

 

I met an strange issue on some kind of android phone with the smack 4.1.1.

 

My code is below, i use the  contidition:isConnected() and isAuthenticated() tocheck if the connection is reliable or not, but i found in some kind of android phonethere is an stranger issuethat is theisConnected() and isAuthenticated() will both return true, but in the openfile management part, this user is offline in fact

 

if(connection.isConnected()&&connection.isAuthenticated()){

    this connection is valid and no need to reconnect it

}else{
     reconnect and login it}

 

 

My question is: can isConnected() and isAuthenticated() be the right condition to judge if the connection is valid or not?If no, what is the right condition code that i should have to write.Thanks a lot!!!!!!!!!

 

 

-llsha


Viewing all articles
Browse latest Browse all 4979

Trending Articles