Hi all,
We have build a client on smack 2.0.0. Using server Wildfire 2.4.0. We have written our own provider class to Authenticate the client on the server.
The login is not reliable and it take a long time to authenticate the users.
I was wonder is this because of this code in SASLAuthentication.java, authenticate() method
// Wait until SASL negotiation finishes
synchronized (this) {
if (!saslNegotiated && !saslFailed) {
try {
wait(30000);
} catch (InterruptedException e) {
}
}
}[/i]
I am not sure why do we add wait here? Why not use listener or some packet collector? Make it event driven.
I see these lines in bindResourceAndEstablishSession() method
// Wait until server sends response containing the element
synchronized (this) {
if (!resourceBinded) {
try {
wait(30000);
} catch (InterruptedException e) {
}
}
}[/i]
Why can’'t all this be made event driven rather than using timer?
Can someone help what might be goingo on?
Thanks
Mahaveer