It's always true for the first hook invocation, but if there is more than one plugin, it could vanish between the two! In the default configuration, this can't happen. This bug has been around since v23.02. Note: we always tell all the plugins about the peer, even if it's already gone. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: lightningd: possible crash when peers disconnected if there was more than one plugin servicing the `peer_connected` hook. Reported-by: https://github.com/santyr Fixes: https://github.com/ElementsProject/lightning/issues/8858
114 KiB
114 KiB