I have an application where a ReadListener and a WriteListener (call it
MyWriteListener) set to the ServletInputStream and the ServletOutputStream
objects. Updating the Tomcat container from 8.5.73 to 8.5.75, the follow
error occured. The ServletOutputStream objects's isReady function always
returns false (within MyWriteListener.onWritePossible).

I think its because of this commit:

The ReadListener is set first, where dispatch fired
(action(ActionCode.DISPATCH_EXECUTE, null);). There the request threadId
updated (req.setRequestThread();).
Then  when i'm setting the WriteListener (within the same thread), the
DISPACTH_EXECUTE action not fired (due to threadId equals request objects
thread id).  Thus registeredForWrite flag remains is true state, causing
the isReady false behaviour.

Is this a Tomcat bug, or I should do something differently. I could't set
WriteListener within a different thread, but it feels weird. Should i do
something else?

Thank You in Advance,

Reply via email to