Skip to content

Commit 429144d

Browse files
authored
fix: copy app ID in healthcheck (coder#12087)
1 parent bb30885 commit 429144d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codersdk/agentsdk/convert.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,11 @@ func ProtoFromAppHealthsRequest(req PostAppHealthsRequest) (*proto.BatchUpdateAp
286286
if !ok {
287287
return nil, xerrors.Errorf("unknown app health: %s", h)
288288
}
289+
290+
var idCopy uuid.UUID
291+
copy(idCopy[:], id[:])
289292
pReq.Updates = append(pReq.Updates, &proto.BatchUpdateAppHealthRequest_HealthUpdate{
290-
Id: id[:],
293+
Id: idCopy[:],
291294
Health: proto.AppHealth(hp),
292295
})
293296
}

0 commit comments

Comments
 (0)