On 12/04/17 12:22, Violeta Georgieva wrote:
> Hi,
> 
> I have a question about ServletOutputStream#isReady.
> 
> I have the following scenario:
> - thread A removes the Read/WriteListeners when async timeout/error happens
> [1], [2]
> - before receiving AsyncListener#onTimeout/onError, thread B checks whether
> it is save to perform write invoking ServletOutputStream#isReady. The
> exception below happens:
> 
> 
> java.lang.IllegalStateException: It is invalid to call isReady() when the
> response has not been put into non-blocking mode
> at org.apache.coyote.Response.isReady(Response.java:635)

<snip/>

> I think that we should not throw ISE but return "false" in such cases.
> 
> What do you think?

Seems reasonable to me. I've checked the EG archives and I can't find
any reference to a discussion that decided otherwise.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to