Skip to content

Commit

Permalink
lib/attack: Remove redundant re-assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tsenart committed Nov 7, 2014
1 parent 249c223 commit 6551f49
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func Timeout(d time.Duration) func(*Attacker) {
tr.ResponseHeaderTimeout = d
a.dialer.Timeout = d
tr.Dial = a.dialer.Dial
a.client.Transport = tr
}
}

Expand All @@ -95,7 +94,6 @@ func LocalAddr(addr net.IPAddr) func(*Attacker) {
tr := a.client.Transport.(*http.Transport)
a.dialer.LocalAddr = &net.TCPAddr{IP: addr.IP, Zone: addr.Zone}
tr.Dial = a.dialer.Dial
a.client.Transport = tr
}
}

Expand All @@ -109,7 +107,6 @@ func KeepAlive(keepalive bool) func(*Attacker) {
a.dialer.KeepAlive = 0
tr.Dial = a.dialer.Dial
}
a.client.Transport = tr
}
}

Expand All @@ -119,7 +116,6 @@ func TLSConfig(c *tls.Config) func(*Attacker) {
return func(a *Attacker) {
tr := a.client.Transport.(*http.Transport)
tr.TLSClientConfig = c
a.client.Transport = tr
}
}

Expand Down

0 comments on commit 6551f49

Please sign in to comment.