From 62d89faa469a7df0ddbbbc38d2af0dea3532b492 Mon Sep 17 00:00:00 2001 From: Cheuk <90270663+cheukt@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:19:03 -0400 Subject: [PATCH] RSDK-4457 - Use web context when adding new camera streams (#2782) --- robot/web/web.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/robot/web/web.go b/robot/web/web.go index 101aab10180..e1b03af9181 100644 --- a/robot/web/web.go +++ b/robot/web/web.go @@ -454,7 +454,10 @@ func (svc *webService) Reconfigure(ctx context.Context, deps resource.Dependenci if err := svc.updateResources(deps); err != nil { return err } - return svc.addNewStreams(ctx) + if !svc.isRunning { + return nil + } + return svc.addNewStreams(svc.cancelCtx) } func (svc *webService) updateResources(resources map[resource.Name]resource.Resource) error {