5e3b239ebc
In this commit, we fix an existing source of a panic, that could at times lead to a deadlock. If the circuit returned from closeCircuit didn't have an outgoing key (as it was an incomplete forward), then we would attempt to de-ref a nil pointer. This would trigger a panic, and the runtime would start to unwind the stack, and execute each defer in line. A deadlock can arise here, as in the defer at the root goroutine, we need to grab the fwdingEventMtx. However, we already have it at the panic site. We fix this issue by ensuring we only attempt to add the event if it's a _settle_ and also actually has an outgoing circuit (which it should already, just a defensive check). |
||
---|---|---|
.. | ||
hodl | ||
circuit_map.go | ||
circuit_test.go | ||
circuit.go | ||
decayedlog_test.go | ||
decayedlog.go | ||
failure.go | ||
interfaces.go | ||
iterator.go | ||
link_test.go | ||
link.go | ||
log.go | ||
mailbox_test.go | ||
mailbox.go | ||
mock.go | ||
packet.go | ||
queue_test.go | ||
queue.go | ||
sequencer.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |