lib/connections: Handle wrapped connection in SetTCPOptions (fixes #3223)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3225
This commit is contained in:
Jakob Borg
2016-05-31 08:11:57 +00:00
committed by Audrius Butkevicius
parent 9d756525ce
commit ac40b27c79
7 changed files with 35 additions and 29 deletions

View File

@@ -8,7 +8,6 @@ package connections
import (
"crypto/tls"
"net"
"net/url"
"time"
@@ -40,7 +39,7 @@ func (d *relayDialer) Dial(id protocol.DeviceID, uri *url.URL) (IntermediateConn
return IntermediateConnection{}, err
}
err = dialer.SetTCPOptions(conn.(*net.TCPConn))
err = dialer.SetTCPOptions(conn)
if err != nil {
conn.Close()
return IntermediateConnection{}, err