mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +01:00
Prevent GC of connection within pingServerIfNecessary()
This commit is contained in:
parent
9a16f68433
commit
810e7c8b78
1 changed files with 4 additions and 1 deletions
|
@ -377,7 +377,10 @@ public final class PingManager extends Manager {
|
|||
res = pingMyServer(false);
|
||||
}
|
||||
catch (InterruptedException | SmackException e) {
|
||||
LOGGER.log(Level.WARNING, "Exception while pinging server", e);
|
||||
// Note that we log the connection here, so that it is not GC'ed between the call to isAuthenticated
|
||||
// a few lines above and the usage of the connection within pingMyServer(). In order to prevent:
|
||||
// https://community.igniterealtime.org/thread/59369
|
||||
LOGGER.log(Level.WARNING, "Exception while pinging server of " + connection, e);
|
||||
res = false;
|
||||
}
|
||||
// stop when we receive a pong back
|
||||
|
|
Loading…
Reference in a new issue