On Fri, Aug 11, 2017 at 3:14 PM, Sergey Mashkov <
sergey.mash...@jetbrains.com> wrote:

> Hi everyone
>
> I am experiencing race condition: from time to time when I cann to
> UpgradedServletOutputStream.setWriteListener(myCallback) servlet container
> doesn't invoke neither myCallback.onWritePossible() nor .onError.
>
> I believe the reason is that setWriteListener() method implementation sets
> listener reference _AFTER_ it schedules dispatch/registers write listener.
> I've checked regular (non-upgraded) CoyoteOutput and I see it's
> implementation does the same but in correct order. Also I see that
> UpgradedServletInputStream.setWriteListener also has such a strange order:
>
> Ok, I don't see why and if I place it in the sync above there's no
testsuite issue. I'll wait for Mark to ack that though, just in case
there's a trick.

Rémy

Reply via email to