Merge pull request #2022 from denverdino/master

Fix NPE in dialer
This commit is contained in:
Michael Crosby 2018-01-18 13:18:34 -05:00 committed by GitHub
commit e1321c51a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ func Dialer(address string, timeout time.Duration) (net.Conn, error) {
close(stopC)
go func() {
dr := <-synC
if dr != nil {
if dr != nil && dr.c != nil {
dr.c.Close()
}
}()