Changeset 123b4ca
- Timestamp:
- Nov 9, 2015 5:48:19 PM (5 years ago)
- Branches:
- master
- Children:
- 48f29402
- Parents:
- c944fcce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
router/java/src/net/i2p/router/transport/OutboundMessageRegistry.java
rc944fcce r123b4ca 259 259 260 260 private class CleanupTask extends SimpleTimer2.TimedEvent { 261 /** LOCKING: _selectors */ 261 262 private long _nextExpire; 262 263 … … 326 327 if (log) { 327 328 int e = removing.size(); 328 int r = _selectors.size(); 329 int r; 330 synchronized(_selectors) { 331 r = _selectors.size(); 332 } 329 333 int a = _activeMessages.size(); 330 334 if (r > 0 || e > 0 || a > 0) 331 335 _log.debug("Expired: " + e + " remaining: " + r + " active: " + a); 332 336 } 333 synchronized( this) {337 synchronized(_selectors) { 334 338 if (_nextExpire <= now) 335 339 _nextExpire = now + 10*1000; … … 338 342 } 339 343 340 public synchronizedvoid scheduleExpiration(MessageSelector sel) {344 public void scheduleExpiration(MessageSelector sel) { 341 345 long now = _context.clock().now(); 342 if ( (_nextExpire <= now) || (sel.getExpiration() < _nextExpire) ) { 343 _nextExpire = sel.getExpiration(); 344 reschedule(_nextExpire - now); 346 synchronized(_selectors) { 347 if ( (_nextExpire <= now) || (sel.getExpiration() < _nextExpire) ) { 348 _nextExpire = sel.getExpiration(); 349 reschedule(_nextExpire - now); 350 } 345 351 } 346 352 }
Note: See TracChangeset
for help on using the changeset viewer.