Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb50bb99

Browse files
authored
fix: Check if the response body is nil before panicing (#4448)
If a WebSocket connection couldn't be established, a panic would occur.
1 parentdaa34cf commitb50bb99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎codersdk/provisionerdaemons.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ func (c *Client) provisionerJobLogsAfter(ctx context.Context, path string, after
130130
CompressionMode:websocket.CompressionDisabled,
131131
})
132132
iferr!=nil {
133+
ifres==nil {
134+
returnnil,nil,err
135+
}
133136
returnnil,nil,readBodyAsError(res)
134137
}
135138
logs:=make(chanProvisionerJobLog)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp