Changeset 8a77db1 for router


Ignore:
Timestamp:
Feb 5, 2019 3:39:00 PM (16 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b8270239
Parents:
beb0879
Message:

Transport: Clean up unreachable() methods (ticket #2382)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/TransportImpl.java

    rbeb0879 r8a77db1  
    847847
    848848    public boolean isUnreachable(Hash peer) {
    849         long now = _context.clock().now();
    850849        synchronized (_unreachableEntries) {
    851850            Long when = _unreachableEntries.get(peer);
    852851            if (when == null) return false;
     852            long now = _context.clock().now();
    853853            if (when.longValue() + UNREACHABLE_PERIOD < now) {
    854854                _unreachableEntries.remove(peer);
     
    911911     */
    912912    public boolean wasUnreachable(Hash peer) {
    913         long now = _context.clock().now();
    914913        synchronized (_wasUnreachableEntries) {
    915914            Long when = _wasUnreachableEntries.get(peer);
    916915            if (when != null) {
     916                long now = _context.clock().now();
    917917                if (when.longValue() + WAS_UNREACHABLE_PERIOD < now) {
    918918                    _unreachableEntries.remove(peer);
Note: See TracChangeset for help on using the changeset viewer.