1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-19 02:22:05 +01:00

[core] Remove erroneous "assert !connected" in connect()

Connections like XMPPTCPConnection may still reported connected, if
they are, for example disconnected but resumable. This is already
accounted for in throwAlreadyConnectedExceptionIfAppropriate(), hence
the assert is unnecessary and leads to false negatives for
XMPPTCPConnection.

For the sake of completeness, the right condition, assuming
XMPPTCPConnection is used, for the assert would be:

	assert !connected || disconnectedButResumable;
This commit is contained in:
Florian Schmaus 2021-11-05 10:19:26 +01:00
parent 403890d988
commit 8736e3e434

View file

@ -521,9 +521,6 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
closingStreamReceived = false;
streamId = null;
// The connection should not be connected nor marked as such prior calling connectInternal().
assert !connected;
try {
// Perform the actual connection to the XMPP service
connectInternal();