2015-02-24 10:01 GMT+01:00 Mark Thomas <ma...@apache.org>:

> Progress is being made.
>
> TestWsWebSocketContainer.testMaxMessageSize04() is fixed. I do want to
> come back to exactly how/if flushing is performed on
> ServletOutputStream.close() but I plan on parking that until the other
> failures are fixed.
>
> I'm having issues with the write timeout tests in
TestWsWebSocketContainer, which made me do some changes since there are
still things I don't understand:
- In WsRemoteEndpointImplServer, onWritePossible appears to be able to be
invoked concurrently (doWrite calls it directly and changes the buffers). I
think it should be synced.
- In Nio2Endpoint socket wrapper uses nestedWriteCompletionCount over the
inline flag that was used in 8. If the write completes inline, then isReady
should already be set back to true, and writing could continue. So the
change was IMO adding more write notifications which could hide some
issues. I tried changing that many times following the refactoring started,
but this is the first time I can do it without obviously breaking the
testsuite (where some of the non blocking write tests would hang due to
missing write notifications).
- NPE guards in the NIO connector socket processor for concurrent closing
[NIO2 has them, somehow it wasn't needed earlier in NIO, which is also an
odd thing; I actually feel better having to add them].

So this could improve on some possible timing related problems. I'll keep
on investigating though before committing anything.

Rémy

Reply via email to