Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/viam/sdk/module/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ struct ModuleService::ServiceImpl : viam::module::v1::ModuleService::Service {
stoppable->stop();
}

manager->remove(cfg.resource_name());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below, this calls manager->replace_one. The documentation for replace_one indicates that it will only work right if resource is present, and will fail otherwise. So, by removing the resource here, I think it prevents replace_one below from working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh good catch...i will look into what's happening in replace_one because i think from @hexbabe earlier testing the destructor on the original instance was not getting called during this always-rebuild control flow


const std::shared_ptr<const ModelRegistration> reg =
Registry::get().lookup_model(cfg.name());

Expand Down