Guarding against null streams when resetting.

This is possible when receiving a frame for a non-existent stream:
it is replied with a reset, but the stream object is never created.
This commit is contained in:
Simone Bordet 2015-02-18 22:55:09 +01:00
parent 84b8882624
commit 59ae845d30
1 changed files with 5 additions and 2 deletions

View File

@ -991,8 +991,11 @@ public abstract class HTTP2Session implements ISession, Parser.Listener
}
case RST_STREAM:
{
stream.close();
removeStream(stream, true);
if (stream != null)
{
stream.close();
removeStream(stream, true);
}
break;
}
case SETTINGS: