On Sun, 2015-03-29 at 20:01 +0530, Malaka Gallage wrote:
> Hello everyone,
> 
> I'm migrating from http-nio 4.2.5 to 4.4 and am having some issue with the
> following scenario.
> 
> Some client sends a request and when the server send the response, client
> has closed the connection. The connection state is FIN_WAIT2 --> CLOSE_WAIT.
> 
> In 4.2.5 it throws an IO Exception on this scenario but 4.4 does not throw
> any exception. I tried to debug the code and realized that the problem is,
> in 4.2.5 it first writes only the response headers and when it tries to
> write the response body it trows the IO Exception. But in 4.4, it writes
> the response headers and the payload together and then it can not know the
> connection is closed. So the exception is not thrown. The major differences
> are on this method.
> 
> DefaultNHttpServerConnection#produceOutput
> 
> Is there anyway I can tune the code to achieve my goal?
> 
> Thanks
> Malaka
> 

Hi Malaka
As of version 4.3 HC tries to fit the entire message into one TCP frame
if possible. This generally results in 30% better performance for small
messages. I am afraid the only way to revert to the old behavior is to
implement a custom NHttpServerConnection. 

Oleg




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to