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
76bd6e73
Commit
76bd6e73
authored
Aug 11, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
engine termination on disconnect fixed
parent
d13933bc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
9 deletions
+21
-9
connect_session.cpp
src/connect_session.cpp
+1
-1
connect_session.hpp
src/connect_session.hpp
+3
-3
session.cpp
src/session.cpp
+12
-2
session.hpp
src/session.hpp
+1
-0
transient_session.cpp
src/transient_session.cpp
+1
-1
transient_session.hpp
src/transient_session.hpp
+3
-2
No files found.
src/connect_session.cpp
View file @
76bd6e73
...
@@ -104,7 +104,7 @@ void zmq::connect_session_t::start_connecting ()
...
@@ -104,7 +104,7 @@ void zmq::connect_session_t::start_connecting ()
zmq_assert
(
false
);
zmq_assert
(
false
);
}
}
void
zmq
::
connect_session_t
::
detach
()
void
zmq
::
connect_session_t
::
detach
ed
()
{
{
// Clean up the mess left over by the failed connection.
// Clean up the mess left over by the failed connection.
clean_pipes
();
clean_pipes
();
...
...
src/connect_session.hpp
View file @
76bd6e73
...
@@ -39,11 +39,11 @@ namespace zmq
...
@@ -39,11 +39,11 @@ namespace zmq
const
char
*
protocol_
,
const
char
*
address_
);
const
char
*
protocol_
,
const
char
*
address_
);
~
connect_session_t
();
~
connect_session_t
();
// i_inout interface implementation.
void
detach
();
private
:
private
:
// Hook into session's disconnection mechanism.
void
detached
();
// Start the connection process.
// Start the connection process.
void
start_connecting
();
void
start_connecting
();
...
...
src/session.cpp
View file @
76bd6e73
...
@@ -49,8 +49,10 @@ zmq::session_t::~session_t ()
...
@@ -49,8 +49,10 @@ zmq::session_t::~session_t ()
void
zmq
::
session_t
::
terminate
()
void
zmq
::
session_t
::
terminate
()
{
{
// TODO:
if
(
in_pipe
)
zmq_assert
(
false
);
in_pipe
->
terminate
();
if
(
out_pipe
)
out_pipe
->
terminate
();
}
}
bool
zmq
::
session_t
::
read
(
::
zmq_msg_t
*
msg_
)
bool
zmq
::
session_t
::
read
(
::
zmq_msg_t
*
msg_
)
...
@@ -228,6 +230,14 @@ void zmq::session_t::process_attach (i_engine *engine_,
...
@@ -228,6 +230,14 @@ void zmq::session_t::process_attach (i_engine *engine_,
attached
(
peer_identity_
);
attached
(
peer_identity_
);
}
}
void
zmq
::
session_t
::
detach
()
{
// Engine is dead. Let's forget about it.
engine
=
NULL
;
detached
();
}
void
zmq
::
session_t
::
process_term
()
void
zmq
::
session_t
::
process_term
()
{
{
// Here we are pugging into the own_t's termination mechanism.
// Here we are pugging into the own_t's termination mechanism.
...
...
src/session.hpp
View file @
76bd6e73
...
@@ -46,6 +46,7 @@ namespace zmq
...
@@ -46,6 +46,7 @@ namespace zmq
bool
read
(
::
zmq_msg_t
*
msg_
);
bool
read
(
::
zmq_msg_t
*
msg_
);
bool
write
(
::
zmq_msg_t
*
msg_
);
bool
write
(
::
zmq_msg_t
*
msg_
);
void
flush
();
void
flush
();
void
detach
();
void
attach_pipes
(
class
reader_t
*
inpipe_
,
class
writer_t
*
outpipe_
,
void
attach_pipes
(
class
reader_t
*
inpipe_
,
class
writer_t
*
outpipe_
,
const
blob_t
&
peer_identity_
);
const
blob_t
&
peer_identity_
);
...
...
src/transient_session.cpp
View file @
76bd6e73
...
@@ -29,7 +29,7 @@ zmq::transient_session_t::~transient_session_t ()
...
@@ -29,7 +29,7 @@ zmq::transient_session_t::~transient_session_t ()
{
{
}
}
void
zmq
::
transient_session_t
::
detach
()
void
zmq
::
transient_session_t
::
detach
ed
()
{
{
// There's no way to reestablish a transient session. Tear it down.
// There's no way to reestablish a transient session. Tear it down.
terminate
();
terminate
();
...
...
src/transient_session.hpp
View file @
76bd6e73
...
@@ -36,9 +36,10 @@ namespace zmq
...
@@ -36,9 +36,10 @@ namespace zmq
class
socket_base_t
*
socket_
,
const
options_t
&
options_
);
class
socket_base_t
*
socket_
,
const
options_t
&
options_
);
~
transient_session_t
();
~
transient_session_t
();
// i_inout interface implementation.
private
:
void
detach
();
// Hook into session's disconnection mechanism.
void
detached
();
};
};
}
}
...
...
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