Issue #300 - ensure Sessions are stopped before CompressionPools

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-06-20 09:09:20 +10:00
parent 30dc103a12
commit e67532372c
3 changed files with 11 additions and 1 deletions

View File

@ -88,7 +88,7 @@ public abstract class CompressionPool<T> extends AbstractLifeCycle
if (object == null) if (object == null)
return; return;
if (_capacity == 0) if (_capacity == 0 || isStopped())
{ {
end(object); end(object);
return; return;

View File

@ -400,6 +400,8 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketCont
ShutdownThread.deregister(this); ShutdownThread.deregister(this);
sessionTracker.stop();
extensionRegistry.stop();
super.doStop(); super.doStop();
if (LOG.isDebugEnabled()) if (LOG.isDebugEnabled())

View File

@ -338,6 +338,14 @@ public class WebSocketServerFactory extends ContainerLifeCycle implements WebSoc
super.doStart(); super.doStart();
} }
@Override
protected void doStop() throws Exception
{
sessionTracker.stop();
extensionFactory.stop();
super.doStop();
}
/** /**
* Attempt to find the DecoratedObjectFactory that should be used. * Attempt to find the DecoratedObjectFactory that should be used.
* @return the DecoratedObjectFactory that should be used. (never null) * @return the DecoratedObjectFactory that should be used. (never null)