Projects STRLCPY prox5 Commits 81d70cd6
🤬
  • ■ ■ ■ ■ ■
    mystery_dialer.go
    skipped 23 lines
    24 24   
    25 25  // DialTimeout is a simple stub adapter to implement a net.Dialer with a timeout.
    26 26  func (s *Swamp) DialTimeout(network, addr string, timeout time.Duration) (net.Conn, error) {
    27  - ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(timeout))
     27 + ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(timeout))
     28 + defer cancel()
    28 29   return s.MysteryDialer(ctx, network, addr)
    29 30  }
    30 31   
    skipped 41 lines
Please wait...
Page is in error, reload to recover