You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/01/12 03:49:20 UTC

[4/4] git commit: attempt to humor tests that try to stop and restart MS

attempt to humor tests that try to stop and restart MS


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/452ddf63
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/452ddf63
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/452ddf63

Branch: refs/heads/trunk
Commit: 452ddf63c530fc573551e6fc9c79c1a876f11dd0
Parents: a95eafd
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Jan 11 16:59:33 2012 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Jan 11 16:59:33 2012 -0600

----------------------------------------------------------------------
 .../org/apache/cassandra/net/MessagingService.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/452ddf63/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/MessagingService.java b/src/java/org/apache/cassandra/net/MessagingService.java
index 9ff110e..99037a1 100644
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@ -482,7 +482,21 @@ public final class MessagingService implements MessagingServiceMBean
         logger_.info("Waiting for messaging service to quiesce");
         // We may need to schedule hints on the mutation stage, so it's erroneous to shut down the mutation stage first
         assert !StageManager.getStage(Stage.MUTATION).isShutdown();
+
+        // the important part
         callbacks.shutdown();
+
+        // attempt to humor tests that try to stop and restart MS
+        try
+        {
+            for (SocketThread th : socketThreads)
+                th.close();
+        }
+        catch (IOException e)
+        {
+            throw new IOError(e);
+        }
+
     }
 
     public void receive(Message message, String id)