1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 12:37:58 +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:
Florian Schmaus 2014-11-12 17:36:39 +01:00
parent 301519a264
commit 0db76f4eb1

View file

@ -596,7 +596,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
*/
public synchronized void disconnect(Presence unavailablePresence) throws NotConnectedException {
if (!isConnected()) {
return;
throw new NotConnectedException();
}
sendPacket(unavailablePresence);