Host::create: specify IPv6 scope ID (0)

master
Dorian Wouters 2018-01-14 23:40:09 +01:00
parent 4eceb52afe
commit eb552a052e
No known key found for this signature in database
GPG Key ID: 6E9DA8063322434B
1 changed files with 2 additions and 1 deletions

View File

@ -268,7 +268,8 @@ void Host::create(Port port, uint maxconn) {
host = enet_host_create(nullptr, 1, static_cast<size_t>(Channels::MAX), 0, 0);
} else { // Server
ENetAddress address;
address.host = IN6ADDR_ANY_INIT; // ENET_HOST_ANY;
address.host = in6addr_any;
address.sin6_scope_id = 0;
address.port = port;
host = enet_host_create(&address, maxconn, static_cast<size_t>(Channels::MAX), 0, 0);
}