• Felix Lange's avatar
    p2p: throttle all discovery lookups · 6fb810ad
    Felix Lange authored
    Lookup calls would spin out of control when network connectivity was
    lost. The throttling that was in place only took effect when the table
    returned zero results, which doesn't happen very often.
    
    The new throttling should not have a negative impact when the host is
    online. Lookups against the network take some time and dials for all
    results must complete or hit the cache before a new one is started. This
    usually takes longer than four seconds, leaving online lookups
    unaffected.
    
    Fixes #1296
    6fb810ad
server.go 18.2 KB