mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-02 08:58:38 +02:00
This commit fixes a case where the peer blocks the shutdown process. During the shutdown, the server will call `s.DisconnectPeer`, which calls `peer.Disconnect`. Because the peer never enters `peer.Start` via `s.peerInitializer`, the `startReady` chan will not be closed, causing `peer.Disconnect` to hang forever. We now fix it by only block on `startReady` when the peer is started.