Skip to content

Commit

Permalink
Fixed a problem where Push sessions made by StreamMap didn't end auto…
Browse files Browse the repository at this point in the history
…matically.
  • Loading branch information
Keukhan committed Dec 23, 2024
1 parent b071cb2 commit b2783ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/projects/publishers/push/push_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace pub
auto pushes = GetPushesByStreamMap(stream_map.GetPath(), info);
for(auto &push : pushes)
{
StartPush(push);
StartPush(push, true);
}
}

Expand Down Expand Up @@ -129,7 +129,7 @@ namespace pub
return it->second;
}

std::shared_ptr<ov::Error> PushApplication::StartPush(const std::shared_ptr<info::Push> &push)
std::shared_ptr<ov::Error> PushApplication::StartPush(const std::shared_ptr<info::Push> &push, bool is_config)
{
ov::String error_message;

Expand All @@ -147,7 +147,7 @@ namespace pub

push->SetEnable(true);
push->SetRemove(false);
push->SetByConfig(false);
push->SetByConfig(is_config);

std::unique_lock<std::shared_mutex> lock(_push_map_mutex);
_pushes[push->GetId()] = push;
Expand Down
2 changes: 1 addition & 1 deletion src/projects/publishers/push/push_application.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace pub
bool DeleteStream(const std::shared_ptr<info::Stream> &info) override;

public:
std::shared_ptr<ov::Error> StartPush(const std::shared_ptr<info::Push> &push);
std::shared_ptr<ov::Error> StartPush(const std::shared_ptr<info::Push> &push, bool is_config = false);
std::shared_ptr<ov::Error> StopPush(const std::shared_ptr<info::Push> &push);
std::shared_ptr<ov::Error> GetPushes(const std::shared_ptr<info::Push> push, std::vector<std::shared_ptr<info::Push>> &results);

Expand Down

0 comments on commit b2783ad

Please sign in to comment.