Fixed failAllData() logic to return true if the stream is already remotely closed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-11-27 13:45:28 +01:00
parent a241b9dd5e
commit ce4bb35e97
1 changed files with 3 additions and 1 deletions

View File

@ -248,7 +248,9 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
}
copy.forEach(dataEntry -> dataEntry.callback.failed(x));
DataEntry lastDataEntry = copy.isEmpty() ? null : copy.get(copy.size() - 1);
return lastDataEntry != null && lastDataEntry.frame.isEndStream();
if (lastDataEntry == null)
return isRemotelyClosed();
return lastDataEntry.frame.isEndStream();
}
public boolean isLocallyClosed()