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
37d83719
Commit
37d83719
authored
Sep 09, 2009
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
async connect bug fixed
parent
d3fb9f90
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
zmq_connecter.cpp
src/zmq_connecter.cpp
+6
-13
No files found.
src/zmq_connecter.cpp
View file @
37d83719
...
...
@@ -68,13 +68,8 @@ void zmq::zmq_connecter_t::out_event ()
rm_fd
(
handle
);
handle_valid
=
false
;
// If there was error during the connecting, close the socket and wait
// for a while before trying to reconnect.
if
(
fd
==
retired_fd
)
{
tcp_connecter
.
close
();
add_timer
();
return
;
}
// TODO: Handle the error condition by eventual reconnect.
zmq_assert
(
fd
!=
retired_fd
);
// Create an init object.
io_thread_t
*
io_thread
=
choose_io_thread
(
options
.
affinity
);
...
...
@@ -90,8 +85,7 @@ void zmq::zmq_connecter_t::out_event ()
void
zmq
::
zmq_connecter_t
::
timer_event
()
{
// Reconnect period have elapsed.
start_connecting
();
zmq_assert
(
false
);
}
void
zmq
::
zmq_connecter_t
::
start_connecting
()
...
...
@@ -106,14 +100,13 @@ void zmq::zmq_connecter_t::start_connecting ()
}
// Connection establishment may be dealyed. Poll for its completion.
else
if
(
rc
==
-
1
&&
errno
==
E
AGAIN
)
{
else
if
(
rc
==
-
1
&&
errno
==
E
INPROGRESS
)
{
handle
=
add_fd
(
tcp_connecter
.
get_fd
());
handle_valid
=
true
;
set_pollout
(
handle
);
return
;
}
// If none of the above is true, synchronous error occured.
// Wait for a while and retry.
add_timer
();
// TODO: Handle the error condition by eventual reconnect.
zmq_assert
(
false
);
}
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