mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
fix: Check for a response body when dialing the Tailnet WebSocket (#4327)
There was a panic in this code that caused it to fail on error!
This commit is contained in:
@ -387,7 +387,7 @@ func (c *Client) DialWorkspaceAgentTailnet(ctx context.Context, logger slog.Logg
|
|||||||
CompressionMode: websocket.CompressionDisabled,
|
CompressionMode: websocket.CompressionDisabled,
|
||||||
})
|
})
|
||||||
if isFirst {
|
if isFirst {
|
||||||
if err != nil && res.StatusCode == http.StatusConflict {
|
if res != nil && res.StatusCode == http.StatusConflict {
|
||||||
first <- readBodyAsError(res)
|
first <- readBodyAsError(res)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user