Commit 071ec1a9 authored by Doron Somech's avatar Doron Somech

problem:Fallback to localhost in ws_address has no effect

Solution: return after the fallback

fixes #3809
parent 7bfd9512
......@@ -72,8 +72,10 @@ zmq::ws_address_t::ws_address_t (const sockaddr *sa_, socklen_t sa_len_)
char hbuf[NI_MAXHOST];
const int rc = getnameinfo (addr (), addrlen (), hbuf, sizeof (hbuf), NULL,
0, NI_NUMERICHOST);
if (rc != 0)
if (rc != 0) {
_host = std::string ("localhost");
return;
}
std::ostringstream os;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment