diff --git a/pkg/service/roomservice.go b/pkg/service/roomservice.go index 36e36c04c..0bae86fab 100644 --- a/pkg/service/roomservice.go +++ b/pkg/service/roomservice.go @@ -104,7 +104,7 @@ func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomReq defer done() if created { - go s.agentClient.LaunchJob(context.Background(), &agent.JobDescription{ + go s.agentClient.LaunchJob(context.WithoutCancel(ctx), &agent.JobDescription{ JobType: livekit.JobType_JT_ROOM, Room: rm, }) @@ -314,7 +314,7 @@ func (s *RoomService) UpdateRoomMetadata(ctx context.Context, req *livekit.Updat } if created { - go s.agentClient.LaunchJob(ctx, &agent.JobDescription{ + go s.agentClient.LaunchJob(context.WithoutCancel(ctx), &agent.JobDescription{ JobType: livekit.JobType_JT_ROOM, Room: room, })