lib/connections: Don't close nil connections (fixes #4605)

This commit is contained in:
Audrius Butkevicius 2017-12-18 14:40:51 +00:00
parent 8fa2b7765a
commit 2547a29dd7

View File

@ -44,7 +44,6 @@ func (d *kcpDialer) Dial(id protocol.DeviceID, uri *url.URL) (internalConn, erro
conn, err = kcp.DialWithOptions(uri.Host, nil, 0, 0)
}
if err != nil {
conn.Close()
return internalConn{}, err
}