| skipped 40 lines |
41 | 41 | | var count int |
42 | 42 | | // pull down proxies from channel until we get a proxy good enough for our spoiled asses |
43 | 43 | | for { |
| 44 | + | select { |
| 45 | + | case <-ctx.Done(): |
| 46 | + | return nil, ctx.Err() |
| 47 | + | default: |
| 48 | + | } |
44 | 49 | | max := s.GetDialerBailout() |
45 | 50 | | if count > max { |
46 | 51 | | return nil, errors.New("giving up after " + strconv.Itoa(max) + " tries") |
| skipped 31 lines |