Change mechanism of closing XMPP session in SM on close of TCP connection
Currently Tigase XMPP Server when receives TCP connection close in any client connection manager then it notifies SessionManager about this using command with SYSTEM priority.
Other packet which were sent just before TCP close are sent to SessionManager with NORMAL priority which makes it possible that session is closed in SessionManager before packets sent before connection close are properly processed.
To make sure this works correctly we should keep current priority of close command to notify SessionManager that this connection is closed for outgoing packets but we should add new command with NORMAL priority to fully remove session in SessionManager as command with NORMAL priority will be processed after all packets received before connection is closed.
Issue #3511 - Change mechanism of closing XMPP session in SM on close of TCP connection
#3 Updated by Andrzej Wójcik over 3 years ago
- Assignee changed from Andrzej Wójcik to Artur Hefczyc
- % Done changed from 80 to 100
I changed mechanism of closing session to close session and execute processors stopped method after every packet from closing connection is processed. This way every packet will be processed while session is still opened.
In reaction on STREAM_CLOSED command I left only code resposible for removing session from list of active resouces which will prevent SessionManager from delivering packets to already closed connection.