slightly simpler

This commit is contained in:
Ted Unangst 2019-10-16 02:48:33 -04:00
parent ec80662d2c
commit 5e33ab4c87
1 changed files with 1 additions and 2 deletions

View File

@ -129,8 +129,7 @@ func GetJunkTimeout(url string, timeout time.Duration) (junk.Junk, error) {
if ok { if ok {
log.Printf("awaiting result for %s", url) log.Printf("awaiting result for %s", url)
c := make(chan JunkError) c := make(chan JunkError)
inflight = append(inflight, c) flightdeck[url] = append(inflight, c)
flightdeck[url] = inflight
decklock.Unlock() decklock.Unlock()
je := <-c je := <-c
close(c) close(c)