Issue #3481 provisional work around
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
b6b7d2e730
commit
dc7d0b70e3
|
@ -1096,8 +1096,21 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
|
||||||
close = ishut;
|
close = ishut;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flush)
|
if (flush && !flush(BufferUtil.EMPTY_BUFFER))
|
||||||
flush(BufferUtil.EMPTY_BUFFER); // Send the TLS close message.
|
{
|
||||||
|
// We failed to flush. Try a few times more after short delay just in case progress can be made
|
||||||
|
// TODO configure these loops and delays or use writeInterest
|
||||||
|
int retry = 15;
|
||||||
|
for (;retry-->0;)
|
||||||
|
{
|
||||||
|
Thread.sleep(100);
|
||||||
|
if (flush(BufferUtil.EMPTY_BUFFER))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// if we still can't flush, we will close
|
||||||
|
close |= retry==0;
|
||||||
|
}
|
||||||
|
|
||||||
if (close)
|
if (close)
|
||||||
getEndPoint().close();
|
getEndPoint().close();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue