cmd/strelaysrv: Use legacy dial (fixes #3753)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3784
This commit is contained in:
Audrius Butkevicius 2016-12-02 22:45:08 +00:00
parent 99922feb3b
commit 0dcf2f1bc8

View File

@ -129,10 +129,10 @@ func main() {
laddr.Port = 0 laddr.Port = 0
transport, ok := http.DefaultTransport.(*http.Transport) transport, ok := http.DefaultTransport.(*http.Transport)
if ok { if ok {
transport.DialContext = (&net.Dialer{ transport.Dial = (&net.Dialer{
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
LocalAddr: laddr, LocalAddr: laddr,
}).DialContext }).Dial
} }
} }