Removed guard whether the channel is closed in checkIdleTimestamp().
This follows commit ff29a1cc51
for JETTY-1322.
The reason to remove the guard is that the channel may be closed multiple times, and if for any reason
a check to the idle timestamp triggers, then the idle callback is invoked, but it's not really idle: it is
already closed.
When used with SSL, this causes a truncation attack exception thrown by SSLEngine, because the idle
callback causes a shutdown of the SSLEngine without having received a SSL close alert.
This commit is contained in:
parent
416b6a8a15
commit
fa0e06d186
|
@ -280,7 +280,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
||||||
public void checkIdleTimestamp(long now)
|
public void checkIdleTimestamp(long now)
|
||||||
{
|
{
|
||||||
long idleTimestamp=_idleTimestamp;
|
long idleTimestamp=_idleTimestamp;
|
||||||
if (!getChannel().isOpen() || idleTimestamp!=0 && _maxIdleTime>0 && now>(idleTimestamp+_maxIdleTime))
|
if (idleTimestamp!=0 && _maxIdleTime>0 && now>(idleTimestamp+_maxIdleTime))
|
||||||
{
|
{
|
||||||
onIdleExpired();
|
onIdleExpired();
|
||||||
_idleTimestamp=now;
|
_idleTimestamp=now;
|
||||||
|
|
Loading…
Reference in New Issue