409598 spdy: Fix NPE when a broken client tried to create duplicate stream IDs

This commit is contained in:
Thomas Becker 2013-06-12 16:23:31 +02:00
parent 9501ef3392
commit d93faf589c
1 changed files with 8 additions and 2 deletions

View File

@ -490,9 +490,15 @@ public class StandardSession implements ISession, Parser.Listener, Dumpable
goAway(x.getSessionStatus(), 0, TimeUnit.SECONDS, new Callback.Adapter());
}
private void onSyn(SynStreamFrame frame)
private void onSyn(final SynStreamFrame frame)
{
IStream stream = createStream(frame, null, false, null);
IStream stream = createStream(frame, null, false, new Promise.Adapter<Stream>(){
@Override
public void failed(Throwable x)
{
LOG.debug("Received: {} but creating new Stream failed: {}", frame, x.getMessage());
}
});
if (stream != null)
processSyn(listener, stream, frame);
}