Skip to content

Commit 25923b9

Browse files
adjackuracopybara-github
authored andcommitted
Ensure connection is closed on initial stream creation errors
PiperOrigin-RevId: 718952903
1 parent 9f75e66 commit 25923b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ func CreateConnection(ctx context.Context, channelID string, regional bool, opts
432432
}
433433

434434
if err := conn.createStream(ctx); err != nil {
435+
conn.close(err)
435436
return nil, err
436437
}
437438

0 commit comments

Comments
 (0)