UDP connect wrongly passes port as addr family to resolveHost

This commit is contained in:
Mathias L. Baumann 2018-12-07 15:51:23 +01:00 committed by Mathias Baumann
parent 26b6190743
commit e2834a245b

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)
{