mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 09:50:32 +01:00
parent
2bc8f952e2
commit
50ad0e7666
@ -289,29 +289,33 @@ public class ConnectionImpl implements Connection, DashboardRenderable {
|
||||
}
|
||||
|
||||
private void processRelayCell(Cell cell) {
|
||||
Circuit circuit;
|
||||
circuitsLock.lock();
|
||||
try {
|
||||
final Circuit circuit = circuitMap.get(cell.getCircuitId());
|
||||
circuit = circuitMap.get(cell.getCircuitId());
|
||||
if(circuit == null) {
|
||||
logger.warning("Could not deliver relay cell for circuit id = "+ cell.getCircuitId() +" on connection "+ this +". Circuit not found");
|
||||
return;
|
||||
}
|
||||
circuit.deliverRelayCell(cell);
|
||||
} finally {
|
||||
circuitsLock.unlock();
|
||||
}
|
||||
|
||||
circuit.deliverRelayCell(cell);
|
||||
}
|
||||
|
||||
private void processControlCell(Cell cell) {
|
||||
Circuit circuit;
|
||||
circuitsLock.lock();
|
||||
try {
|
||||
final Circuit circuit = circuitMap.get(cell.getCircuitId());
|
||||
if(circuit != null) {
|
||||
circuit.deliverControlCell(cell);
|
||||
}
|
||||
circuit = circuitMap.get(cell.getCircuitId());
|
||||
} finally {
|
||||
circuitsLock.unlock();
|
||||
}
|
||||
|
||||
if(circuit != null) {
|
||||
circuit.deliverControlCell(cell);
|
||||
}
|
||||
}
|
||||
|
||||
void idleCloseCheck() {
|
||||
|
Loading…
Reference in New Issue
Block a user