mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Improve handling of InterruptedException
InterruptedExceptions should be treated as the users intention to 'cancel' the current thread's task. There is no such thing as a spurious interrupt (not to be confused with "spurious wakeups").
This commit is contained in:
parent
14b03149db
commit
d099e7b16d
5 changed files with 15 additions and 11 deletions
|
@ -201,7 +201,6 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
return (P) queue.poll(wait, TimeUnit.SECONDS);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
// TODO handle spurious interrupts
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ public class WaitForPacketListener implements PacketListener {
|
|||
}
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
// TODO better handling of spurious interrupts
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue