Changeset fefcb6c


Ignore:
Timestamp:
Dec 26, 2010 11:35:27 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6ee1620
Parents:
cdcbc802
Message:

prevent leak after exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/client/I2PSessionImpl.java

    rcdcbc802 rfefcb6c  
    865865        LookupWaiter waiter = new LookupWaiter(h);
    866866        _pendingLookups.offer(waiter);
    867         sendMessage(new DestLookupMessage(h));
    868867        try {
    869             synchronized (waiter) {
    870                 waiter.wait(maxWait);
    871             }
    872         } catch (InterruptedException ie) {}
    873         _pendingLookups.remove(waiter);
     868            sendMessage(new DestLookupMessage(h));
     869            try {
     870                synchronized (waiter) {
     871                    waiter.wait(maxWait);
     872                }
     873            } catch (InterruptedException ie) {}
     874        } finally {
     875            _pendingLookups.remove(waiter);
     876        }
    874877        return waiter.destination;
    875878    }
Note: See TracChangeset for help on using the changeset viewer.