mirror of
https://github.com/matrix-construct/construct
synced 2024-12-29 08:54:02 +01:00
ircd::server: Make close timeout shorter on close_all (shutdown).
This commit is contained in:
parent
ea3f7abde5
commit
37753a9648
1 changed files with 11 additions and 1 deletions
|
@ -150,14 +150,24 @@ ircd::server::accumulate_peers(F&& closure)
|
|||
});
|
||||
}
|
||||
|
||||
ircd::conf::item<ircd::seconds>
|
||||
close_all_timeout
|
||||
{
|
||||
{ "name", "ircd.server.close_all_timeout" },
|
||||
{ "default", 2L },
|
||||
};
|
||||
|
||||
void
|
||||
ircd::server::close_all()
|
||||
{
|
||||
log.debug("Closing all %zu peers",
|
||||
peer_count());
|
||||
|
||||
net::close_opts opts;
|
||||
opts.timeout = seconds(close_all_timeout);
|
||||
|
||||
for(auto &peer : peers)
|
||||
peer.second->close();
|
||||
peer.second->close(opts);
|
||||
|
||||
log.debug("Waiting for %zu tags on %zu links on %zu peers to close...",
|
||||
tag_count(),
|
||||
|
|
Loading…
Reference in a new issue