Hi Oleg, Thanks for the reply. I'll stick to the current 4.4 implementation and will go with that. It's nice to hear about the performance gain of the new implementation.
Thanks Malaka On Mon, Mar 30, 2015 at 7:39 PM, Oleg Kalnichevski <[email protected]> wrote: > 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] > > -- Regards, *Malaka GallageSoftware Engineer* *AdroitLogic Lanka (Pvt) Ltd.* [image: Facebook] <https://www.facebook.com/malaka.gallage> [image: Twitter] <http://twitter.com/#%21/MalakaGallage> [image: LinkedIn] <http://www.linkedin.com/profile/view?id=91872322&trk=tab_pro> [image: Blogger] <http://swordofpoet.blogspot.com/> Skype : malaka.gallage Mobile : +94 718 796 378
