Skip to content

Commit 6afc370

Browse files
authored
Merge pull request #12 from yuuki/fix_connect_nil_pointer_dereference
connect: fix nil pointer dereference of the 'conn' object
2 parents 3897d4f + 6371630 commit 6afc370

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/connect.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ func connectPersistent(ctx context.Context, addrport string) error {
296296
if err != nil {
297297
cause <- xerrors.Errorf("could not dial %q: %w", addrport, err)
298298
cancel()
299+
return
299300
}
300301
defer conn.Close()
301302

0 commit comments

Comments
 (0)