diff options
author | jestin | 2005-11-22 12:16:36 +0000 |
---|---|---|
committer | jestin | 2005-11-22 12:16:36 +0000 |
commit | 8e92224db5274f8a028f28f830b52e78ee88fda2 (patch) | |
tree | 2d4281a99d94329bce5b23af65377243cccbd98e /src/IvyWatcher.java | |
parent | 5d466ac8508cf202bd025bc9d813b07fc47ac44b (diff) | |
download | ivy-java-8e92224db5274f8a028f28f830b52e78ee88fda2.zip ivy-java-8e92224db5274f8a028f28f830b52e78ee88fda2.tar.gz ivy-java-8e92224db5274f8a028f28f830b52e78ee88fda2.tar.bz2 ivy-java-8e92224db5274f8a028f28f830b52e78ee88fda2.tar.xz |
See changes inside.
major change in multibus error handling. I reintroduced bugs ..
Diffstat (limited to 'src/IvyWatcher.java')
-rwxr-xr-x | src/IvyWatcher.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/IvyWatcher.java b/src/IvyWatcher.java index 93d5a8f..b37fa6b 100755 --- a/src/IvyWatcher.java +++ b/src/IvyWatcher.java @@ -65,11 +65,8 @@ package fr.dgac.ivy ; import java.lang.Thread; import java.net.*; import java.io.*; -import java.util.StringTokenizer; import org.apache.regexp.*; import java.util.Hashtable; -import java.util.Vector; -import java.util.Enumeration; class IvyWatcher implements Runnable { private static boolean debug = (System.getProperty("IVY_DEBUG")!=null); @@ -156,7 +153,12 @@ class IvyWatcher implements Runnable { +":"+packet.getPort()+", port:"+remotePort+", protocol version:"+version); if (!alreadyBroadcasted(remotehost.toString(),remotePort)) { traceDebug("no known agent originating from " + remotehost + ":" + remotePort); - new IvyClient(bus,new Socket(remotehost,remotePort),remotePort); + try { + Socket s = new Socket(remotehost,remotePort); + new IvyClient(bus,s,remotePort,false); + } catch ( java.net.ConnectException jnc ) { + traceDebug("cannot connect to "+remotehostname+":"+remotePort+", he probably stopped his bus"); + } } else { traceDebug("there is already a request originating from " + remotehost + ":" + remotePort); } @@ -240,8 +242,10 @@ class IvyWatcher implements Runnable { * went local instead of static ! fixed a nasty bug in 1.2.8 * checks if there is already a broadcast received from the same address * on the same port + * + * regoes static ... */ - private Hashtable alreadySocks=new Hashtable(); + private static Hashtable alreadySocks=new Hashtable(); private synchronized boolean alreadyBroadcasted(String s,int port) { // System.out.println("DEBUUUUUUUG " + s+ ":" + port); if (s==null) return false; |