Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
b2e8a90a
Commit
b2e8a90a
authored
Jul 20, 2016
by
Luca Boccassi
Committed by
GitHub
Jul 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2064 from garlick/issue_2051
Problem: getifaddrs can fail with ECONNREFUSED
parents
d44ef4fa
d090a871
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
tcp_address.cpp
src/tcp_address.cpp
+10
-1
No files found.
src/tcp_address.cpp
View file @
b2e8a90a
...
...
@@ -182,7 +182,16 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
{
// Get the addresses.
ifaddrs
*
ifa
=
NULL
;
const
int
rc
=
getifaddrs
(
&
ifa
);
int
rc
;
const
int
max_attempts
=
10
;
const
int
backoff_msec
=
1
;
for
(
int
i
=
0
;
i
<
max_attempts
;
i
++
)
{
rc
=
getifaddrs
(
&
ifa
);
if
(
rc
==
0
||
(
rc
<
0
&&
errno
!=
ECONNREFUSED
))
break
;
usleep
((
backoff_msec
<<
i
)
*
1000
);
}
if
(
rc
!=
0
&&
errno
==
EINVAL
)
{
// Windows Subsystem for Linux compatibility
LIBZMQ_UNUSED
(
nic_
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment