[ldk-net] Correct pollfds array offset after reads
authorMatt Corallo <git@bluematt.me>
Fri, 29 Apr 2022 19:30:05 +0000 (19:30 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 29 Apr 2022 19:30:05 +0000 (19:30 +0000)
commita2c01e268c29baa592742a621ba6b3b3e44586e1
tree482eaa3a1ac05e3ab8b1dffa22d962624191b2a2
parentcac55d22d66825a31433c59cddb1817c0bdab5f3
[ldk-net] Correct pollfds array offset after reads

Previously, we were copying the pollfds array at an offset of one
into the handler thread's stack. However, when it was changed to
copying at a 0 offset (adding the pipe read fd at the end instead
of beginning), the disable-read handling code was not updated.

This leads to an assertion failure at runtime if LDK decides we
need to stop reading due to the outbound buffer of a peer being
full.
ldk-net/ldk_net.c