mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 03:52:06 +01:00
Add AbstractXMPPConnection.initState()
and init/reset the sychronization points there. This method is called right at the beginning of connect() and at the end of shutdown().
This commit is contained in:
parent
7518bf9a25
commit
c4289b2c18
2 changed files with 13 additions and 3 deletions
|
@ -381,6 +381,12 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
@Override
|
@Override
|
||||||
public abstract boolean isUsingCompression();
|
public abstract boolean isUsingCompression();
|
||||||
|
|
||||||
|
protected void initState() {
|
||||||
|
saslFeatureReceived.init();
|
||||||
|
lastFeaturesReceived.init();
|
||||||
|
tlsHandled.init();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establishes a connection to the XMPP server. It basically
|
* Establishes a connection to the XMPP server. It basically
|
||||||
* creates and maintains a connection to the server.
|
* creates and maintains a connection to the server.
|
||||||
|
@ -399,10 +405,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
throwAlreadyConnectedExceptionIfAppropriate();
|
throwAlreadyConnectedExceptionIfAppropriate();
|
||||||
|
|
||||||
// Reset the connection state
|
// Reset the connection state
|
||||||
|
initState();
|
||||||
saslAuthentication.init();
|
saslAuthentication.init();
|
||||||
saslFeatureReceived.init();
|
|
||||||
lastFeaturesReceived.init();
|
|
||||||
tlsHandled.init();
|
|
||||||
streamId = null;
|
streamId = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -534,6 +534,12 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
reader = null;
|
reader = null;
|
||||||
writer = null;
|
writer = null;
|
||||||
|
|
||||||
|
initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void initState() {
|
||||||
|
super.initState();
|
||||||
maybeCompressFeaturesReceived.init();
|
maybeCompressFeaturesReceived.init();
|
||||||
compressSyncPoint.init();
|
compressSyncPoint.init();
|
||||||
smResumedSyncPoint.init();
|
smResumedSyncPoint.init();
|
||||||
|
|
Loading…
Reference in a new issue