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

Commit096a85e

Browse files
chore: steal CloseRead
1 parent04a92a4 commit096a85e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎agent/agentcontainers/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,10 @@ func (api *API) watchContainers(rw http.ResponseWriter, r *http.Request) {
561561
return
562562
}
563563

564+
// Here we close the websocket for reading, so that the websocket library will handle pings and
565+
// close frames.
566+
_=conn.CloseRead(context.Background())
567+
564568
ctx,wsNetConn:=codersdk.WebsocketNetConn(ctx,conn,websocket.MessageText)
565569
deferwsNetConn.Close()
566570

‎coderd/workspaceagents.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,10 @@ func (api *API) watchWorkspaceAgentContainers(rw http.ResponseWriter, r *http.Re
873873
return
874874
}
875875

876+
// Here we close the websocket for reading, so that the websocket library will handle pings and
877+
// close frames.
878+
_=conn.CloseRead(context.Background())
879+
876880
ctx,wsNetConn:=codersdk.WebsocketNetConn(ctx,conn,websocket.MessageText)
877881
deferwsNetConn.Close()
878882

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp