mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::net: Add conf item for default close opts.
This commit is contained in:
parent
8c5b47950f
commit
abe921c3ad
2 changed files with 10 additions and 1 deletions
|
@ -42,6 +42,8 @@ enum class ircd::net::dc
|
|||
/// Close options structure.
|
||||
struct ircd::net::close_opts
|
||||
{
|
||||
static conf::item<milliseconds> default_timeout;
|
||||
|
||||
close_opts() = default;
|
||||
close_opts(const net::dc &);
|
||||
|
||||
|
@ -49,7 +51,7 @@ struct ircd::net::close_opts
|
|||
net::dc type { dc::SSL_NOTIFY };
|
||||
|
||||
/// The coarse duration allowed for the close() process.
|
||||
milliseconds timeout { 5000ms };
|
||||
milliseconds timeout { default_timeout };
|
||||
|
||||
/// If specified, these socket options will be applied when conducting
|
||||
/// the disconnect (useful for adding an SO_LINGER time etc).
|
||||
|
|
|
@ -486,6 +486,13 @@ ircd::net::reflect(const ready &type)
|
|||
// net/close.h
|
||||
//
|
||||
|
||||
decltype(ircd::net::close_opts::default_timeout)
|
||||
ircd::net::close_opts::default_timeout
|
||||
{
|
||||
{ "name", "ircd.net.close.timeout" },
|
||||
{ "default", 7500L },
|
||||
};
|
||||
|
||||
/// Static instance of default close options.
|
||||
ircd::net::close_opts
|
||||
const ircd::net::close_opts_default
|
||||
|
|
Loading…
Reference in a new issue