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:
parent
cd3692f329
commit
bfdcfba092
4 changed files with 30 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue