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
|
@Override
|
||||||
public void onClose()
|
public void onClose()
|
||||||
{
|
{
|
||||||
|
super.onClose();
|
||||||
LOG.debug("onClose {}",this);
|
LOG.debug("onClose {}",this);
|
||||||
_writeFlusher.onClose();
|
_writeFlusher.onClose();
|
||||||
_fillInterest.onClose();
|
_fillInterest.onClose();
|
||||||
|
|
|
@ -95,6 +95,7 @@ public abstract class IdleTimeout
|
||||||
// If we have a new timeout, then check and reschedule
|
// If we have a new timeout, then check and reschedule
|
||||||
if (idleTimeout>0 && isOpen())
|
if (idleTimeout>0 && isOpen())
|
||||||
_idleTask.run();
|
_idleTask.run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method should be called when non-idle activity has taken place.
|
/** This method should be called when non-idle activity has taken place.
|
||||||
|
@ -120,6 +121,13 @@ public abstract class IdleTimeout
|
||||||
_idleTask.run();
|
_idleTask.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClose()
|
||||||
|
{
|
||||||
|
Scheduler.Task oldTimeout = _timeout.getAndSet(null);
|
||||||
|
if (oldTimeout != null)
|
||||||
|
oldTimeout.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
protected void close()
|
protected void close()
|
||||||
{
|
{
|
||||||
Scheduler.Task oldTimeout = _timeout.getAndSet(null);
|
Scheduler.Task oldTimeout = _timeout.getAndSet(null);
|
||||||
|
|
Loading…
Reference in New Issue