mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
problem:Fallback to localhost in ws_address has no effect
Solution: return after the fallback fixes #3809
This commit is contained in:
parent
7bfd9512e6
commit
071ec1a9bb
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user