2015-02-18 10:45 GMT+01:00 Mark Thomas <ma...@apache.org>: > On 18/02/2015 09:25, r...@apache.org wrote: > > Author: remm > > Date: Wed Feb 18 09:25:30 2015 > > New Revision: 1660582 > > > > URL: http://svn.apache.org/r1660582 > > Log: > > - Add debugging of my own (sorry), on socket close. > > - Try dropping the direct socket close from the upgraded streams (the > sockets seem to still be closed and the ws tests pass with NIO1+2). > > That should be fine. The socket will get closed in > UpgradeProcessor.upgradeDispatch() >
I noticed in the test runs that the close debug was still there, so it looked relatively fine. > > > Actually following the discussions on the EG, I don't think the close > required logic is fully right, it would seem it should wait for both input > AND output to be closed, but this needs to be validated. > > I agree the close logic is wrong. I wanted to fix the existing issues > before I started on this. Looking at the code, it shouldn't be too hard > to fix. > > The stream close could cause calling shutdownInput and shutdownOutput. Switching to: if (upgradeServletInputStream.isCloseRequired() && upgradeServletOutputStream.isCloseRequired()) { return SocketState.CLOSED; } in UpgradeProcessor doesn't work (the socket close occurs during shutdown during the tests). Rémy