lib/connections: Handle wrapped connection in SetTCPOptions (fixes #3223)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3225
This commit is contained in:
committed by
Audrius Butkevicius
parent
9d756525ce
commit
ac40b27c79
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user