mirror of https://github.com/ARMmbed/mbed-os.git
Fixed missing port assignment in DNS constructor for SocketAddress
_stack->gethostbyname looks deceptively like it completely sets the socket address value, however port is not provided via DNS resolution.pull/2246/head
parent
0675a58009
commit
8f2ca2bc63
|
@ -274,6 +274,7 @@ void SocketAddress::_SocketAddress(NetworkStack *iface, const char *host, uint16
|
|||
} else {
|
||||
// DNS lookup
|
||||
int err = iface->gethostbyname(this, host);
|
||||
_port = port;
|
||||
if (err) {
|
||||
_addr = nsapi_addr_t();
|
||||
_port = 0;
|
||||
|
|
Loading…
Reference in New Issue