fork of indigo with slightly nicer lexgen

add a 1ms delay between re-subscribing to PDS instances (#1090)

Assuming 5k active PDS instances, this spreads things out over 5
seconds. had been seeing burst of errors when restarting relay, which I
suspect is related to too many sockets (and DNS lookups) at the same
time.

authored by bnewbold.net and committed by GitHub e7ffa636 db9bb600

Changed files
+3
cmd
relay
relay
+3
cmd/relay/relay/crawl.go
··· 3 3 import ( 4 4 "context" 5 5 "fmt" 6 + "time" 6 7 7 8 "github.com/bluesky-social/indigo/cmd/relay/relay/models" 8 9 ) ··· 71 72 if err != nil { 72 73 logger.Warn("failed to re-subscribe to host", "err", err) 73 74 } 75 + // sleep for a very short period, so we don't open tons of sockets at the same time 76 + time.Sleep(1 * time.Millisecond) 74 77 } 75 78 return nil 76 79 }