1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Throw NotConnectedException instead of NoResponseException

if the connection is not connected in sendStanzaWithResponseCallback and
in PacketCollector.

Also decrease log level if roster result listener's exeption callback is
invoked with a NotConnectedException.
This commit is contained in:
Florian Schmaus 2015-07-03 12:57:30 +02:00
parent cd3692f329
commit bfdcfba092
4 changed files with 30 additions and 4 deletions

View file

@ -341,7 +341,13 @@ public final class Roster extends Manager {
connection.sendIqWithResponseCallback(packet, new RosterResultListener(), new ExceptionCallback() {
@Override
public void processException(Exception exception) {
LOGGER.log(Level.SEVERE, "Exception reloading roster" , exception);
Level logLevel;
if (exception instanceof NotConnectedException) {
logLevel = Level.FINE;
} else {
logLevel = Level.SEVERE;
}
LOGGER.log(logLevel, "Exception reloading roster" , exception);
}
});
}