Fixed
Details
Assignee
Florian SchmausFlorian SchmausReporter
Robin CollierRobin CollierLabels
Components
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Florian Schmaus
Florian SchmausReporter
Robin Collier
Robin CollierLabels
Components
Fix versions
Affects versions
Priority
Created April 11, 2012 at 4:27 PM
Updated October 28, 2020 at 1:28 PM
Resolved October 27, 2013 at 5:41 PM
Cleanup during connection.disconnect() can cause issues due to listeners being dropped:
When running in an environement like Android where the connection may be disconnected and reconnected due to changing network interfaces, this causes problems since it changes the state of the connection in ways other than its connection status. This would force the application to know what changes occured and restore the connection to its original state on reconnection.
This behavior was introduced with cs7183.
If this is fixed the design of the Mangers would also become easier. As of now, Managers have to add PacketListeners when the connection is connected and remove them when the connection goes down (normal or because of an error). This is sometimes forgotten by the programmers of Managers (e.g. https://igniterealtime.atlassian.net/browse/SMACK-441#icft=SMACK-441) and therefore prone to memory leaks. If we keep the state of a Connection, Managers would only need to add a PacketListner once in the lifetime of a Connection instance.