• Felix Lange's avatar
    p2p: fix Peer shutdown deadlocks · f1d710af
    Felix Lange authored
    There were multiple synchronization issues in the disconnect handling,
    all caused by the odd special-casing of Peer.readLoop errors. Remove the
    special handling of read errors and make readLoop part of the Peer
    WaitGroup.
    
    Thanks to @Gustav-Simonsson for pointing at arrows in a diagram
    and playing rubber-duck.
    f1d710af
peer_test.go 6.03 KB