Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 367fb95

Browse files
committed
Add comment
1 parent 4996df1 commit 367fb95

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

coderd/workspaces.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ func (api *api) watchWorkspace(rw http.ResponseWriter, r *http.Request) {
516516
}
517517
defer c.Close(websocket.StatusInternalError, "internal error")
518518

519+
// Makes the websocket connection write-only
519520
ctx := c.CloseRead(r.Context())
520521

521522
// Send a heartbeat every 15 seconds to avoid the websocket being killed.

0 commit comments

Comments
 (0)