mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +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,
|
||||
})
|
||||
if isFirst {
|
||||
if err != nil && res.StatusCode == http.StatusConflict {
|
||||
if res != nil && res.StatusCode == http.StatusConflict {
|
||||
first <- readBodyAsError(res)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user