Fix bogus reentrancy from read_event -> do_attempt_write_data
authorMatt Corallo <git@bluematt.me>
Thu, 10 Jun 2021 16:36:16 +0000 (16:36 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 10 Jun 2021 18:48:30 +0000 (18:48 +0000)
commit62d4007c19b090c18fb1183dc3af19eb1b4b31b1
treeb0fc6ca5894434bc15af9315c8f45ff3edddd64f
parent5bf4cad92a97705dafe845ce998c7cdc84e8520f
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