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)
return;
if (_capacity == 0)
if (_capacity == 0 || isStopped())
{
end(object);
return;

View File

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

View File

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