444748 - WebSocketClient.stop() does not unregister from ShutdownThread

+ Making (de)register smart about if wsclient is registered or not
This commit is contained in:
Joakim Erdfelt 2014-09-22 11:18:30 -07:00
parent ddcf878c32
commit b633778b33
1 changed files with 9 additions and 1 deletions

View File

@ -264,6 +264,11 @@ public class WebSocketClient extends ContainerLifeCycle implements SessionListen
{
if (LOG.isDebugEnabled())
LOG.debug("Stopping {}",this);
if (ShutdownThread.isRegistered(this))
{
ShutdownThread.deregister(this);
}
if (cookieStore != null)
{
@ -435,7 +440,10 @@ public class WebSocketClient extends ContainerLifeCycle implements SessionListen
private synchronized void initialiseClient() throws IOException
{
ShutdownThread.register(this);
if (!ShutdownThread.isRegistered(this))
{
ShutdownThread.register(this);
}
if (executor == null)
{