Merge pull request #108 from Marenz/patch-1

UDP connect wrongly passes port as addr family to resolveHost
This commit is contained in:
Sönke Ludwig 2018-12-20 10:13:22 +01:00 committed by GitHub
commit 6a9a082ac4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -975,7 +975,12 @@ struct UDPConnection {
Once connected, the UDPConnection can only communicate with the specified peer.
Otherwise communication with any reachable peer is possible.
*/
void connect(string host, ushort port) { connect(resolveHost(host, port)); }
void connect(string host, ushort port)
{
auto address = resolveHost(host);
address.port = port;
connect(address);
}
/// ditto
void connect(NetworkAddress address)
{