0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-20 10:58:20 +02:00

ircd::net: Add conf item for default close opts.

This commit is contained in:
Jason Volk 2018-06-01 04:08:20 -07:00
parent 8c5b47950f
commit abe921c3ad
2 changed files with 10 additions and 1 deletions

View file

@ -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).

View file

@ -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