On Tue, Sep 30, 2008 at 12:46:54PM +0530, Asankha C. Perera wrote: > When using keep-alive connections, Apache Synapse needs to ensure that a > connection is not just about to be closed after the expiration of the > socket timeout. The HttpConnection.isStale() tells of the expensive - > but guaranteed way to make sure of this, by making a blocking call on > the socket. However, this is not possible when we are non-blocking, and > the NHttpConnectionBase does not do this full check. > > Is this something that I have missed, or is this something we still have > to implement? > > thanks > asankha >
Hi Asankha HttpConnection#isStale() is only applicable to blocking connections, as in the blocking I/O model there is no way to test if a socket is still valid on both sides other than performing a read operation on that socket. #isStale() is basically meaningless for NIO connections. I very much regret not having moved the method to a blocking I/O specific interface. Oleg > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]