EOS might not be delivered by progressbuffer in some cases. This is regression from
JDK-8043352. JDK-8043352 moved clearing pending events in progress buffer when upstream sends EOS. We need to do this for any other events except EOS. If we clear pending EOS, then it will not be delivered and we simple hang due to downstream will wait for data or EOS. We still need to clear any events such as new segment and not deliver it once we receive EOS.