Issue #2037 - HTTP/2 stream reset leaves stream frames in the flusher.

Simplified stream staleness checks.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2017-12-11 11:45:04 +01:00
parent d88e2b767f
commit f30c02fa45
1 changed files with 2 additions and 2 deletions

View File

@ -342,7 +342,7 @@ public class HTTP2Flusher extends IteratingCallback implements Dumpable
private void complete()
{
if (!isProtocol() && stream != null && stream.isReset())
if (isStale())
failed(new EofException("reset"));
else
succeeded();
@ -361,7 +361,7 @@ public class HTTP2Flusher extends IteratingCallback implements Dumpable
private boolean isStale()
{
return !isProtocol() && stream != null && (stream.isReset() || stream.getSession().getStream(stream.getId()) == null);
return !isProtocol() && stream != null && stream.isReset();
}
private boolean isProtocol()