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

Commitc517aab

Browse files
author
Rafael Rodriguez
authored
fix: add heartbeat to keep dynamic params websocket open (#20026)
## SummaryIn this pull request we're adding a heartbeat to the`handleParameterWebsocket` function to ensure that the connection staysopen until the 30 min timeout has been reached.Closes:#19805### Testing- Reproduced the problem mentioned in the issue (websocket connectioncloses after ~10 minutes of inactivity on the create workspace page)<img width="1870" height="357" alt="Screenshot 2025-09-26 at 15 58 51"src="https://github.com/user-attachments/assets/a9e2e89e-87c5-4afa-9644-afe246a15f79"/>- Confirmed that adding the heartbeat kept the connection open until the30 min timeout was reached<img width="1636" height="387" alt="Screenshot 2025-09-29 at 15 51 43"src="https://github.com/user-attachments/assets/0a8c5cda-29a6-493d-a6c0-4a2629da8838"/>
1 parent1f71c2c commitc517aab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎coderd/parameters.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ func (api *API) handleParameterWebsocket(rw http.ResponseWriter, r *http.Request
139139
})
140140
return
141141
}
142+
gohttpapi.Heartbeat(ctx,conn)
143+
142144
stream:=wsjson.NewStream[codersdk.DynamicParametersRequest, codersdk.DynamicParametersResponse](
143145
conn,
144146
websocket.MessageText,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp