Skip to content

Commit

Permalink
stop and join gbfs thread during shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch committed Nov 13, 2024
1 parent e53cbf5 commit b759712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ int server(data d, config const& c) {
if (rt_update_ioc != nullptr) {
rt_update_ioc->stop();
}
if (gbfs_update_ioc != nullptr) {
gbfs_update_ioc->stop();
}
});

fmt::println("listening on {}:{}\nlocal link: http://localhost:{}",
Expand All @@ -147,6 +150,9 @@ int server(data d, config const& c) {
if (rt_update_thread != nullptr) {
rt_update_thread->join();
}
if (gbfs_update_thread != nullptr) {
gbfs_update_thread->join();
}

return 0;
}
Expand Down

0 comments on commit b759712

Please sign in to comment.