465857 - Support HTTP/2 clear-text server-side upgrade.

Added earlier check about the connection being upgraded to avoid
doing more work in the now obsolete connection.
This commit is contained in:
Simone Bordet 2015-04-30 09:33:10 +02:00
parent fb958833de
commit c04896c9cb
1 changed files with 5 additions and 2 deletions

View File

@ -224,6 +224,10 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
// Parse the request buffer // Parse the request buffer
boolean handle = parseRequestBuffer(); boolean handle = parseRequestBuffer();
// If there was a connection upgrade, the other
// connection took over, nothing more to do here.
if (getEndPoint().getConnection()!=this)
break;
// Handle close parser // Handle close parser
if (_parser.isClose()) if (_parser.isClose())
@ -245,8 +249,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
// Continue or break? // Continue or break?
else if (filled<=0) else if (filled<=0)
{ {
// Be fill interested only if there was no connection upgrade. if (filled==0)
if (filled==0 && getEndPoint().getConnection()==this)
fillInterested(); fillInterested();
break; break;
} }