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
e0534643
Commit
e0534643
authored
May 27, 2012
by
Martin Hurton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify error handling in tcp_connecter
parent
13ef1e4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
tcp_connecter.cpp
src/tcp_connecter.cpp
+6
-9
No files found.
src/tcp_connecter.cpp
View file @
e0534643
...
...
@@ -218,20 +218,17 @@ int zmq::tcp_connecter_t::open ()
if
(
rc
==
0
)
return
0
;
// Translate
other
error codes indicating asynchronous connect has been
// Translate error codes indicating asynchronous connect has been
// launched to a uniform EINPROGRESS.
#ifdef ZMQ_HAVE_WINDOWS
if
(
rc
==
SOCKET_ERROR
&&
(
WSAGetLastError
()
==
WSAEINPROGRESS
||
WSAGetLastError
()
==
WSAEWOULDBLOCK
))
{
const
int
error_code
=
WSAGetLastError
();
if
(
error_code
==
WSAEINPROGRESS
||
error_code
==
WSAEWOULDBLOCK
)
errno
=
EINPROGRESS
;
return
-
1
;
}
errno
=
wsa_error_to_errno
(
WSAGetLastError
());
else
errno
=
wsa_error_to_errno
(
error_code
);
#else
if
(
rc
==
-
1
&&
errno
==
EINTR
)
{
if
(
errno
==
EINTR
)
errno
=
EINPROGRESS
;
return
-
1
;
}
#endif
return
-
1
;
}
...
...
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