• Steven Allen's avatar
    fix deadlock in bitswap sessions · a94755db
    Steven Allen authored
    This deadlock would happen when calling SessionsForBlock (holding
    bitswap.sessLk) while the session's main loop was trying to deregister the
    session (taking bitswap.sessLk).
    
    I've also defensively added selects on contexts for two other channel writes
    just in case.
    
    fixes #4394
    
    ...well, it fixes *a* deadlock showing up in that issue, there may be more.
    
    License: MIT
    Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
    a94755db
session.go 7.97 KB