I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit fefcb6c2 authored by zzz's avatar zzz
Browse files

prevent leak after exception

parent cdcbc802
No related branches found
No related tags found
No related merge requests found
......@@ -864,13 +864,16 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
return null;
LookupWaiter waiter = new LookupWaiter(h);
_pendingLookups.offer(waiter);
sendMessage(new DestLookupMessage(h));
try {
synchronized (waiter) {
waiter.wait(maxWait);
}
} catch (InterruptedException ie) {}
_pendingLookups.remove(waiter);
sendMessage(new DestLookupMessage(h));
try {
synchronized (waiter) {
waiter.wait(maxWait);
}
} catch (InterruptedException ie) {}
} finally {
_pendingLookups.remove(waiter);
}
return waiter.destination;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment