402075 Cancel idle timeouts on close
This commit is contained in:
parent
0ed3638660
commit
718ee4ddeb
|
@ -100,6 +100,7 @@ public abstract class AbstractEndPoint extends IdleTimeout implements EndPoint
|
|||
@Override
|
||||
public void onClose()
|
||||
{
|
||||
super.onClose();
|
||||
LOG.debug("onClose {}",this);
|
||||
_writeFlusher.onClose();
|
||||
_fillInterest.onClose();
|
||||
|
|
|
@ -95,6 +95,7 @@ public abstract class IdleTimeout
|
|||
// If we have a new timeout, then check and reschedule
|
||||
if (idleTimeout>0 && isOpen())
|
||||
_idleTask.run();
|
||||
|
||||
}
|
||||
|
||||
/** This method should be called when non-idle activity has taken place.
|
||||
|
@ -119,6 +120,13 @@ public abstract class IdleTimeout
|
|||
if (_idleTimeout>0)
|
||||
_idleTask.run();
|
||||
}
|
||||
|
||||
public void onClose()
|
||||
{
|
||||
Scheduler.Task oldTimeout = _timeout.getAndSet(null);
|
||||
if (oldTimeout != null)
|
||||
oldTimeout.cancel();
|
||||
}
|
||||
|
||||
protected void close()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue