Skip to content

Commit

Permalink
Turn off failureCheckAndFlushThread when freezing the connections.
Browse files Browse the repository at this point in the history
Also remove a duplicate check on "started" at stop().
  • Loading branch information
Francisco Borges authored and clebertsuconic committed Mar 27, 2013
1 parent 6acabc8 commit 8fcc44b
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ public synchronized void allowInvmSecurityOverride(HornetQPrincipal principal)

public synchronized void freeze(final CoreRemotingConnection connectionToKeepOpen)
{
if (!started)
return;
failureCheckAndFlushThread.close(false);

for (Acceptor acceptor : acceptors)
{
try
Expand Down Expand Up @@ -321,11 +325,6 @@ public void stop(final boolean criticalError) throws Exception
return;
}

if (!started)
{
return;
}

failureCheckAndFlushThread.close(criticalError);

// We need to stop them accepting first so no new connections are accepted after we send the disconnect message
Expand Down

0 comments on commit 8fcc44b

Please sign in to comment.