* Issue #1958 Blocking timeout Use tryFillInterested to allow retries on spurious wakeups Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
0f07c6518e
commit
918cf625cc
|
@ -564,7 +564,15 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
|
|||
|
||||
public void blockingReadFillInterested()
|
||||
{
|
||||
getEndPoint().fillInterested(_blockingReadCallback);
|
||||
// We try fillInterested here because of SSL and
|
||||
// spurious wakeups. With blocking reads, we read in a loop
|
||||
// that tries to read/parse content and blocks waiting if there is
|
||||
// none available. The loop can be woken up by incoming encrypted
|
||||
// bytes, which due to SSL might not produce any decrypted bytes.
|
||||
// Thus the loop needs to register fill interest again. However if
|
||||
// the loop is woken up spuriously, then the register interest again
|
||||
// can result in a pending read exception, unless we use tryFillInterested.
|
||||
getEndPoint().tryFillInterested(_blockingReadCallback);
|
||||
}
|
||||
|
||||
public void blockingReadFailure(Throwable e)
|
||||
|
|
Loading…
Reference in New Issue