Fix race in peer connection in C++ demo app
authorMatt Corallo <git@bluematt.me>
Sun, 29 Oct 2023 18:40:47 +0000 (18:40 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 29 Oct 2023 18:44:01 +0000 (18:44 +0000)
commitdf6bde199404ae987e4c3cf8f85865955b3f2ab4
treedce505510e901f0227c48de60225057fa53025ec
parentfd396cecbaf30cd771a268d2dcd4e9afa85e18e1
Fix race in peer connection in C++ demo app

When we disconnect then immediately reconnect from one peer we may
still get the second connection through before the disconnection is
handled on the other end, causing connection failures. We fix this
here by disconnecting on both ends before reconnecting.
lightning-c-bindings/demo.cpp