mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 21:04:26 +08:00
fix(network): use correct protocol for systemd socket
Update AsyncAcceptor to assign the socket using the endpoint's protocol instead of hardcoded IPv4. This ensures compatibility with both IPv4 and IPv6 endpoints when using systemd socket activation.
This commit is contained in:
parent
bc755bf275
commit
2fe3b8ea61
@ -15,8 +15,8 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SYSTEMD_H_
|
||||
#define _SYSTEMD_H_
|
||||
#ifndef _SYSTEMD_H_
|
||||
#define _SYSTEMD_H_
|
||||
|
||||
int get_listen_fd();
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ public:
|
||||
{
|
||||
LOG_DEBUG("network", "Using socket from systemd socket activation");
|
||||
boost::system::error_code errorCode;
|
||||
_acceptor.assign(boost::asio::ip::tcp::v4(), listen_fd, errorCode);
|
||||
_acceptor.assign(_endpoint.protocol(), listen_fd, errorCode);
|
||||
if (errorCode)
|
||||
LOG_WARN("network", "Failed to assign socket {}", errorCode.message());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user