Browse Source

lightningd: call disconnect notifier if other side disconnected.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pull/2938/head
Rusty Russell 6 years ago
parent
commit
443d95e487
  1. 1
      CHANGELOG.md
  2. 4
      lightningd/peer_control.c

1
CHANGELOG.md

@ -26,6 +26,7 @@ changes.
### Fixed
- Plugin: `pay` no longer crashes on timeout.
- Plugin: `disconnect` notifier now called if remote side disconnects.
### Security

4
lightningd/peer_control.c

@ -392,6 +392,8 @@ void channel_errmsg(struct channel *channel,
const char *desc,
const u8 *err_for_them)
{
notify_disconnect(channel->peer->ld, &channel->peer->id);
/* No per_peer_state means a subd crash or disconnection. */
if (!pps) {
channel_fail_transient(channel, "%s: %s",
@ -405,8 +407,6 @@ void channel_errmsg(struct channel *channel,
err_for_them,
tal_count(err_for_them), 0);
notify_disconnect(channel->peer->ld, &channel->peer->id);
/* BOLT #1:
*
* A sending node:

Loading…
Cancel
Save