mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 21:04:26 +08:00
get_listen_fds -> get_listen_fd
This commit is contained in:
parent
8606ff060a
commit
2619f4e61d
@ -22,7 +22,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
int get_listen_fds()
|
||||
int get_listen_fd()
|
||||
{
|
||||
char* const listen_pid = std::getenv("LISTEN_PID");
|
||||
char* const listen_fds = std::getenv("LISTEN_FDS");
|
||||
@ -44,7 +44,7 @@ int get_listen_fds()
|
||||
}
|
||||
#else
|
||||
// On non-Linux systems, just return 0 (no socket activation)
|
||||
int get_listen_fds()
|
||||
int get_listen_fd()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
#ifndef _SYSTEMD_H_
|
||||
#define _SYSTEMD_H_
|
||||
|
||||
int get_listen_fds();
|
||||
int get_listen_fd();
|
||||
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ public:
|
||||
_socket(ioContext), _closed(false), _socketFactory([this](){ return DefaultSocketFactory(); }),
|
||||
_supportSocketActivation(supportSocketActivation)
|
||||
{
|
||||
int const listen_fd = get_listen_fds();
|
||||
int const listen_fd = get_listen_fd();
|
||||
if (_supportSocketActivation && listen_fd > 0)
|
||||
{
|
||||
LOG_DEBUG("network", "Using socket from systemd socket activation");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user