Merge pull request #2246 from geky/fix-nsapi-sa-port

[nsapi] Fix missing port assignment in DNS constructor for SocketAddress
pull/2064/head
Sam Grove 2016-07-25 22:15:52 -05:00 committed by GitHub
commit fb4b43fb9f
1 changed files with 1 additions and 0 deletions

View File

@ -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;