powered by Jive Software

Cannot close stream using </stream:stream> in 2.1.2

The subject says it all. I cannot seem to close the stream using the </stream:stream> tag. The only way is if I close my socket connection.

Can anyone confirm?

Thanks

Hey Daniel,

The way to close a connection is by sending a #close message to the SocketConnection. The SocketConnection in turn will send the </stream:stream>. So you are correct in your assumption.

FYI, sending SocketConnection#close not only closes the underlying TCP connection but it also notifies to the connection listeners that the connection has been closed. This will trigger the session removal from the SessionManager which holds all the user sessions.

Regards,

– Gato

Thanks for the response. That is good to know and answers my question.

I was thrown off a bit because I was reading RFC 3920 (Section 4.1). I know you are not 100% compliant…yet, so I don’'t hold you to this

“When the client desires to close the stream, it simply sends a closing tag to the server (alternatively, the stream may be closed by the server), after which both the client and server SHOULD terminate the underlying connection (usually a TCP connection) as well.”