[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
1 changed files with 0 additions and 3 deletions

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();