From f786c6fde88e5082dd613924162acd52abe857e5 Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 11 Aug 2019 01:27:32 +0800 Subject: [PATCH] Fix missing channel count in network creation --- src/network/network.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/network.cpp b/src/network/network.cpp index cf8441d24..dacd3100e 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -20,6 +20,7 @@ #include "config/user_config.hpp" #include "io/file_manager.hpp" +#include "network/event.hpp" #include "network/network_config.hpp" #include "network/network_string.hpp" #include "network/transport_address.hpp" @@ -94,7 +95,7 @@ Network::~Network() ENetPeer *Network::connectTo(const TransportAddress &address) { const ENetAddress enet_address = address.toEnetAddress(); - return enet_host_connect(m_host, &enet_address, 2, 0); + return enet_host_connect(m_host, &enet_address, EVENT_CHANNEL_COUNT, 0); } // connectTo // ----------------------------------------------------------------------------