Author: toad
Date: 2007-06-27 22:32:32 +0000 (Wed, 27 Jun 2007)
New Revision: 13785

Modified:
   trunk/freenet/src/freenet/node/PeerNode.java
Log:
Update the peer node status when we get a new time delta.
Not doing this caused nodes to be listed as CONNECTED when they were really 
CLOCK PROBLEM.

Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java        2007-06-27 21:00:20 UTC 
(rev 13784)
+++ trunk/freenet/src/freenet/node/PeerNode.java        2007-06-27 22:32:32 UTC 
(rev 13785)
@@ -3939,10 +3939,13 @@
                return ""+getPeer()+" : "+getName();
        }

-       public synchronized void setTimeDelta(long delta) {
-               clockDelta = delta;
-               if(Math.abs(clockDelta) > MAX_CLOCK_DELTA)
-                       isRoutable = false;
+       public void setTimeDelta(long delta) {
+               synchronized(this) {
+                       clockDelta = delta;
+                       if(Math.abs(clockDelta) > MAX_CLOCK_DELTA)
+                               isRoutable = false;
+               }
+               setPeerNodeStatus(System.currentTimeMillis());
        }

        public long getClockDelta() {


Reply via email to