0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-04 21:08:57 +01:00

modules/s_listen: Use tls buffer for these stringifications.

This commit is contained in:
Jason Volk 2019-04-15 22:02:30 -07:00
parent 74a28f2f10
commit 450e31e333

View file

@ -205,12 +205,13 @@ static bool
_listener_proffer(net::listener &listener,
const net::ipport &ipport)
{
thread_local char strbuf[256];
if(unlikely(ircd::run::level != ircd::run::level::RUN))
{
log::dwarning
{
"Refusing to add new client from %s in runlevel %s",
string(ipport),
string(strbuf, ipport),
reflect(ircd::run::level)
};
@ -226,7 +227,7 @@ _listener_proffer(net::listener &listener,
log::warning
{
"Refusing to add new client from %s because maximum of %zu reached",
string(ipport),
string(strbuf, ipport),
size_t(client::settings::max_client)
};