Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.0
-
None
Description
Mina endpoint as a server could be closed as the initiative of the server.
Read life scenario (FTP example) :
client opens connection to server
C:login foo
S:welcome foo
C:logout
S:bye
server closes the connection
For now, in org.apache.camel.Processor, the only ways to close connection is to call
((MinaExchange) exchange).getSession().close();
but if a exchange out body has been specified, it raises an exception, because the session is already closed.
or to do
exchange.getOut().setBody(null); // raises a WARNING : Can not write body since its null, closing session
Then, there is no way to send a "BYE" message just before closing the connection of the client.