]> git.bitcoin.ninja Git - rust-lightning/commit
Fix bogus reentrancy from read_event -> do_attempt_write_data
authorMatt Corallo <git@bluematt.me>
Wed, 16 Jun 2021 18:57:21 +0000 (18:57 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 21 Jun 2021 16:02:18 +0000 (16:02 +0000)
commita6463ec6cd8f8604e1e1b6e3300b144c5a1b6e4b
tree8c5e019f38dbf28d823adf91539e4df281ce64cf
parentf4323d98b87cb1a6458c788dfea540d51c0c4130
Fix bogus reentrancy from read_event -> do_attempt_write_data

`Julian Knutsen <julianknutsen@users.noreply.github.com>` pointed
out in a previous discussion that `read_event` can reenter user
code despite the documentation stating explicitly that it will not.

This was addressed in #456 by simply codifying the reentrancy, but
its somewhat simpler to just drop the `do_attempt_write_data` call.

Ideally we could land most of Julian's work, but its still in need
of substantial git history cleanup to get it in a reviewable state
and this solves the immediate issue.
lightning/src/ln/peer_handler.rs