fix for bug 45279, close multicast socket on close
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 25 Jun 2008 20:44:48 +0000 (20:44 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 25 Jun 2008 20:44:48 +0000 (20:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@671650 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/tribes/membership/McastServiceImpl.java

index 052d963..ea629e4 100644 (file)
@@ -304,6 +304,7 @@ public class McastServiceImpl
             send(false);
             //leave mcast group
             try {socket.leaveGroup(address);}catch ( Exception ignore){}
+            try {socket.close();}catch ( Exception ignore){}
             serviceStartTime = Long.MAX_VALUE;
         }
         return (startLevel == 0);