mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-15 20:12:04 +01:00
Throw a NotConnectedException on disconnect()
if not connected. For consistent behavior, so that it is always thrown. Previously it may be thrown or not.
This commit is contained in:
parent
301519a264
commit
0db76f4eb1
1 changed files with 1 additions and 1 deletions
|
@ -596,7 +596,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
*/
|
*/
|
||||||
public synchronized void disconnect(Presence unavailablePresence) throws NotConnectedException {
|
public synchronized void disconnect(Presence unavailablePresence) throws NotConnectedException {
|
||||||
if (!isConnected()) {
|
if (!isConnected()) {
|
||||||
return;
|
throw new NotConnectedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPacket(unavailablePresence);
|
sendPacket(unavailablePresence);
|
||||||
|
|
Loading…
Reference in a new issue