Fixes #1816 - HttpClientTest.testClientCannotValidateServerCertificate() hangs with JDK 9.
Now upgrading the connection also in cased of filled=-1, so that the new nested connection attempts to read/write and will see a failure (although not the SslHandshakeException).
This commit is contained in:
parent
ac2776259c
commit
8d03e97205
|
@ -80,13 +80,17 @@ public abstract class NegotiatingClientConnection extends AbstractConnection
|
|||
while (true)
|
||||
{
|
||||
int filled = fill();
|
||||
if (filled == 0 && !completed)
|
||||
fillInterested();
|
||||
if (filled <= 0 || completed)
|
||||
if (completed || filled < 0)
|
||||
{
|
||||
replaceConnection();
|
||||
break;
|
||||
}
|
||||
if (filled == 0)
|
||||
{
|
||||
fillInterested();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (completed)
|
||||
replaceConnection();
|
||||
}
|
||||
|
||||
private int fill()
|
||||
|
|
Loading…
Reference in New Issue