lib/connections: Validate device id before assuming success (fixes #5934) (#5935)

* lib/connections: Validate device id before assuming success (fixes #5934)

* Vet
This commit is contained in:
Audrius Butkevicius
2019-08-09 12:31:42 +01:00
committed by GitHub
parent 7b37d453f9
commit 58ef5368f8
6 changed files with 48 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ type tcpDialer struct {
tlsCfg *tls.Config
}
func (d *tcpDialer) Dial(id protocol.DeviceID, uri *url.URL) (internalConn, error) {
func (d *tcpDialer) Dial(_ protocol.DeviceID, uri *url.URL) (internalConn, error) {
uri = fixupPort(uri, config.DefaultTCPPort)
conn, err := dialer.DialTimeout(uri.Scheme, uri.Host, 10*time.Second)