Projects tigase _server server-core Issues #568
Change mechanism of closing XMPP session in SM on close of TCP connection (#568)
Closed
Andrzej Wójcik (Tigase) opened 9 years ago
Due Date
2015-09-14

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.

Andrzej Wójcik (Tigase) commented 9 years ago

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.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
RedmineID
3511
Version
tigase-server-7.1.0
Spent time
69h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#568
Please wait...
Page is in error, reload to recover