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
ec9f8994
Commit
ec9f8994
authored
Jun 13, 2012
by
Martin Hurton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify {tcp|ipc}_connecter
Make start_connecting () to have singe exit point.
parent
e0fed9d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ipc_connecter.cpp
src/ipc_connecter.cpp
+4
-4
tcp_connecter.cpp
src/tcp_connecter.cpp
+4
-4
No files found.
src/ipc_connecter.cpp
View file @
ec9f8994
...
@@ -142,7 +142,6 @@ void zmq::ipc_connecter_t::start_connecting ()
...
@@ -142,7 +142,6 @@ void zmq::ipc_connecter_t::start_connecting ()
handle
=
add_fd
(
s
);
handle
=
add_fd
(
s
);
handle_valid
=
true
;
handle_valid
=
true
;
out_event
();
out_event
();
return
;
}
}
// Connection establishment may be delayed. Poll for its completion.
// Connection establishment may be delayed. Poll for its completion.
...
@@ -151,12 +150,13 @@ void zmq::ipc_connecter_t::start_connecting ()
...
@@ -151,12 +150,13 @@ void zmq::ipc_connecter_t::start_connecting ()
handle_valid
=
true
;
handle_valid
=
true
;
set_pollout
(
handle
);
set_pollout
(
handle
);
session
->
monitor_event
(
ZMQ_EVENT_CONNECT_DELAYED
,
endpoint
.
c_str
(),
zmq_errno
());
session
->
monitor_event
(
ZMQ_EVENT_CONNECT_DELAYED
,
endpoint
.
c_str
(),
zmq_errno
());
return
;
}
}
// Handle any other error condition by eventual reconnect.
// Handle any other error condition by eventual reconnect.
close
();
else
{
add_reconnect_timer
();
close
();
add_reconnect_timer
();
}
}
}
void
zmq
::
ipc_connecter_t
::
add_reconnect_timer
()
void
zmq
::
ipc_connecter_t
::
add_reconnect_timer
()
...
...
src/tcp_connecter.cpp
View file @
ec9f8994
...
@@ -155,7 +155,6 @@ void zmq::tcp_connecter_t::start_connecting ()
...
@@ -155,7 +155,6 @@ void zmq::tcp_connecter_t::start_connecting ()
handle
=
add_fd
(
s
);
handle
=
add_fd
(
s
);
handle_valid
=
true
;
handle_valid
=
true
;
out_event
();
out_event
();
return
;
}
}
// Connection establishment may be delayed. Poll for its completion.
// Connection establishment may be delayed. Poll for its completion.
...
@@ -164,12 +163,13 @@ void zmq::tcp_connecter_t::start_connecting ()
...
@@ -164,12 +163,13 @@ void zmq::tcp_connecter_t::start_connecting ()
handle_valid
=
true
;
handle_valid
=
true
;
set_pollout
(
handle
);
set_pollout
(
handle
);
session
->
monitor_event
(
ZMQ_EVENT_CONNECT_DELAYED
,
endpoint
.
c_str
(),
zmq_errno
());
session
->
monitor_event
(
ZMQ_EVENT_CONNECT_DELAYED
,
endpoint
.
c_str
(),
zmq_errno
());
return
;
}
}
// Handle any other error condition by eventual reconnect.
// Handle any other error condition by eventual reconnect.
close
();
else
{
add_reconnect_timer
();
close
();
add_reconnect_timer
();
}
}
}
void
zmq
::
tcp_connecter_t
::
add_reconnect_timer
()
void
zmq
::
tcp_connecter_t
::
add_reconnect_timer
()
...
...
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