Skip to content

Commit a03fb1b

Browse files
denverdinoestesp
authored andcommitted
Fix NPE in dialer
Signed-off-by: Li Yi <[email protected]>
1 parent d2179c2 commit a03fb1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dialer/dialer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func Dialer(address string, timeout time.Duration) (net.Conn, error) {
4242
close(stopC)
4343
go func() {
4444
dr := <-synC
45-
if dr != nil {
45+
if dr != nil && dr.c != nil {
4646
dr.c.Close()
4747
}
4848
}()

0 commit comments

Comments
 (0)