mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd): fix memory leak in watchWorkspaceAgentMetadata (#10685)
Fixes #10550
This commit is contained in:
@@ -492,6 +492,11 @@ func (c *Client) WatchWorkspaceAgentMetadata(ctx context.Context, id uuid.UUID)
|
||||
firstEvent = false
|
||||
}
|
||||
|
||||
// Ignore pings.
|
||||
if sse.Type == ServerSentEventTypePing {
|
||||
continue
|
||||
}
|
||||
|
||||
b, ok := sse.Data.([]byte)
|
||||
if !ok {
|
||||
return xerrors.Errorf("unexpected data type: %T", sse.Data)
|
||||
|
||||
Reference in New Issue
Block a user