Hi,
Please find below a fix for:
8179273: sun.net.httpserver.LeftOverInputStream should stop
attempting to drain the stream when the server is stopped
https://bugs.openjdk.java.net/browse/JDK-8179273
webrev:
http://cr.openjdk.java.net/~dfuchs/webrev_8179273/webrev.00/
From the thread dump I obtained it seems that the server
is waiting for the HTTP-Dispatcher thread to terminate
(Thread.join()) but the HTTP-Dispatcher Thread is spinning
in LeftOverInputStream::drain, possibly because it continuously
reads 0 bytes.
The suggested fix is to break out of the loop if the
server is stopping. In that case we don't need to
drain the channel anyway since no further communication
is expected.
best regards,
-- daniel