Fix NPE in dialer
Signed-off-by: Li Yi <denverdino@gmail.com>
This commit is contained in:
parent
acc6011ac1
commit
adfa9a2402
@ -42,7 +42,7 @@ func Dialer(address string, timeout time.Duration) (net.Conn, error) {
|
|||||||
close(stopC)
|
close(stopC)
|
||||||
go func() {
|
go func() {
|
||||||
dr := <-synC
|
dr := <-synC
|
||||||
if dr != nil {
|
if dr != nil && dr.c != nil {
|
||||||
dr.c.Close()
|
dr.c.Close()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user