When XMPPTCPConnection is interrupted internally (i.e. socket exception when connection was lost) PacketReader get stuck in infinite loop and this is log in logcat every few millis : "W/XMPPTCPConnection﹕ Got END_DOCUMENT, aborting parsing"
I have never seen this issue while I was using alpha-4. On October 21 Flow made this commit Don't check for END_DOCUMENT parsePackets() · 5f9c342 · igniterealtime/Smack · GitHub
So now when I reach the END_DOCUMENT sign disconnect() is called. But problem appears in case that I get END_DOCUMENT but I am not connected yet! As you can see on disconnect method below shutdown() is never called in case we are not connected. So it leads to infinite loop and the PacketReader thread is never interrupted.
```
public synchronized void disconnect(Presence unavailablePresence) throws NotConnectedException {
if (!isConnected()) {
return;
}
sendPacket(unavailablePresence);
shutdown();
callConnectionClosedListener();
};
```
To fix this issue I suggest to throw NotConnectedException from disconnect() method in case that we are not connected instead of just returning. It would solve my issue and I think it would not cause any other problems.
Jan
P.S. My code was working fine until I updated smack from 4.1.0-alpha4 to 4.1.0-alpha5. I am using Stream management.