Changeset a65edbef
- Timestamp:
- May 20, 2014 12:35:48 PM (7 years ago)
- Branches:
- master
- Children:
- 06894f9f, d106f48
- Parents:
- 7479aa2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
history.txt
r7479aa2 ra65edbef 1 2014-05-20 zzz 2 * Fixes after code review 3 * SSU: Fix peer test deadlock (ticket #1286) 4 1 5 2014-05-15 kytv 2 6 * Translations, imported from Transifex: -
router/java/src/net/i2p/router/RouterVersion.java
r7479aa2 ra65edbef 19 19 public final static String ID = "Monotone"; 20 20 public final static String VERSION = CoreVersion.VERSION; 21 public final static long BUILD = 2 1;21 public final static long BUILD = 22; 22 22 23 23 /** for example "-test" */ -
router/java/src/net/i2p/router/transport/udp/UDPTransport.java
r7479aa2 ra65edbef 18 18 import java.util.TreeSet; 19 19 import java.util.Vector; 20 import java.util.concurrent.atomic.AtomicLong; 20 21 import java.util.concurrent.ConcurrentHashMap; 21 22 import java.util.concurrent.CopyOnWriteArrayList; … … 3128 3129 private boolean _alive; 3129 3130 /** when did we last test our reachability */ 3130 private long _lastTested;3131 private final AtomicLong _lastTested = new AtomicLong(); 3131 3132 private boolean _forceRun; 3132 3133 … … 3137 3138 public synchronized void timeReached() { 3138 3139 if (shouldTest()) { 3139 long sinceRun = _context.clock().now() - _lastTested ;3140 long sinceRun = _context.clock().now() - _lastTested.get(); 3140 3141 if ( (_forceRun && sinceRun >= MIN_TEST_FREQUENCY) || (sinceRun >= TEST_FREQUENCY) ) { 3141 3142 locked_runTest(); … … 3154 3155 _log.info("Running periodic test with bob = " + bob); 3155 3156 _testManager.runTest(bob.getRemoteIPAddress(), bob.getRemotePort(), bob.getCurrentCipherKey(), bob.getCurrentMACKey()); 3156 _lastTested = _context.clock().now();3157 setLastTested(); 3157 3158 _forceRun = false; 3158 3159 return; … … 3179 3180 */ 3180 3181 public synchronized void forceRunImmediately() { 3181 _lastTested = 0;3182 _lastTested.set(0); 3182 3183 _forceRun = true; 3183 3184 reschedule(5*1000); … … 3198 3199 * @since 0.9.13 3199 3200 */ 3200 public synchronized void setLastTested() { 3201 _lastTested = _context.clock().now(); 3201 public void setLastTested() { 3202 // do not synchronize - deadlock with PeerTestManager 3203 _lastTested.set(_context.clock().now()); 3202 3204 } 3203 3205
Note: See TracChangeset
for help on using the changeset viewer.