Author: jfrederic.clere(a)jboss.com
Date: 2009-07-08 08:59:48 -0400 (Wed, 08 Jul 2009)
New Revision: 2477
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/advertise/impl/MulticastSocketFactoryImpl.java
Log:
macosx behave like linux :-)
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/advertise/impl/MulticastSocketFactoryImpl.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/advertise/impl/MulticastSocketFactoryImpl.java 2009-07-08
12:57:50 UTC (rev 2476)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/advertise/impl/MulticastSocketFactoryImpl.java 2009-07-08
12:59:48 UTC (rev 2477)
@@ -43,13 +43,13 @@
{
final Logger log = Logger.getLogger(this.getClass());
- private final boolean linux;
+ private final boolean linuxlike;
public MulticastSocketFactoryImpl()
{
String value = this.getSystemProperty("os.name");
- this.linux = (value != null) &&
value.toLowerCase().startsWith("linux");
+ this.linuxlike = (value != null) &&
(value.toLowerCase().startsWith("linux") ||
value.toLowerCase().startsWith("mac"));
}
private String getSystemProperty(final String key)
@@ -85,7 +85,7 @@
*/
public MulticastSocket createMulticastSocket(InetAddress address, int port) throws
IOException
{
- if ((address == null) || !this.linux) return new MulticastSocket(port);
+ if ((address == null) || !this.linuxlike) return new MulticastSocket(port);
if (!address.isMulticastAddress())
{