Skip to content

Commit

Permalink
fix #33
Browse files Browse the repository at this point in the history
  • Loading branch information
tmori committed Apr 7, 2024
1 parent 933debf commit f65eb05
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/hako/core/rpc/hako_internal_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@ void hako::core::rpc::notify(std::shared_ptr<data::HakoMasterData> master_data,
if (asset->callback.start == nullptr) { //polling
return;
}
if (my_sem.asset_up == nullptr) {
HakoConfigType config;
hako_config_load(config);
if ((config.param == nullptr) || (config.param["shm_type"] == "shm")) {
my_sem.asset_up = utils::sem::asset_up;
my_sem.asset_down = utils::sem::asset_down;
}
else {
my_sem.asset_up = utils::sem::flock::asset_up;
my_sem.asset_down = utils::sem::flock::asset_down;
}
}

if (!context.is_same(asset_ev->pid)) {
my_sem.asset_up(master_data->get_semid(), asset_id);
return;
Expand Down

0 comments on commit f65eb05

Please sign in to comment.