cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/3] git commit: Catch harmless error on shutdown. Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-5368
Date Wed, 20 Mar 2013 16:40:09 GMT
Updated Branches:
  refs/heads/cassandra-1.2 f3a93f95b -> 87d936251
  refs/heads/trunk 5d2d07f5a -> 08721da28


Catch harmless error on shutdown.
Patch by brandonwilliams, reviewed by jbellis for CASSANDRA-5368


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

Branch: refs/heads/cassandra-1.2
Commit: 87d936251df056211673b90d62f37b9fe3440d83
Parents: f3a93f9
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Mar 20 11:38:45 2013 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Mar 20 11:38:45 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/87d93625/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 98495be..e1331c2 100644
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@ -25,6 +25,7 @@ import java.lang.management.ManagementFactory;
 import java.net.*;
 import java.nio.ByteBuffer;
 import java.nio.channels.AsynchronousCloseException;
+import java.nio.channels.ClosedChannelException;
 import java.nio.channels.ServerSocketChannel;
 import java.util.*;
 import java.util.concurrent.ConcurrentMap;
@@ -888,6 +889,11 @@ public final class MessagingService implements MessagingServiceMBean
                     logger.info("MessagingService shutting down server thread.");
                     break;
                 }
+                catch (ClosedChannelException e)
+                {
+                    logger.debug("MessagingService server thread already closed.");
+                    break;
+                }
                 catch (IOException e)
                 {
                     throw new RuntimeException(e);


Mime
View raw message