NIO2 seems less likely to detect a disconnect when writing, for some reason. When the test fails (extremely rare for me), no error is actually reported by NIO2 so there's nothing that can really be improved from what I can see. Try to disconnect earlier to try to improve the test's reliability on gump (this also makes the test run faster).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1617734 13f79535-47bb-0310-9956-ffa450edef68