mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 00:46:05 +01:00
Merge branch 'master' of git@github.com:sustrik/zeromq2
This commit is contained in:
commit
3534732c06
@ -100,8 +100,8 @@ zmq::dispatcher_t::~dispatcher_t ()
|
|||||||
delete io_threads [i];
|
delete io_threads [i];
|
||||||
|
|
||||||
// Deallocate all the orphaned pipes.
|
// Deallocate all the orphaned pipes.
|
||||||
for (pipes_t::iterator it = pipes.begin (); it != pipes.end (); it++)
|
while (!pipes.empty ())
|
||||||
delete *it;
|
delete *pipes.begin ();
|
||||||
|
|
||||||
delete [] command_pipes;
|
delete [] command_pipes;
|
||||||
|
|
||||||
|
@ -55,6 +55,9 @@ bool zmq::session_t::read (::zmq_msg_t *msg_)
|
|||||||
|
|
||||||
bool zmq::session_t::write (::zmq_msg_t *msg_)
|
bool zmq::session_t::write (::zmq_msg_t *msg_)
|
||||||
{
|
{
|
||||||
|
if (!out_pipe)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (out_pipe->write (msg_)) {
|
if (out_pipe->write (msg_)) {
|
||||||
zmq_msg_init (msg_);
|
zmq_msg_init (msg_);
|
||||||
return true;
|
return true;
|
||||||
@ -65,7 +68,8 @@ bool zmq::session_t::write (::zmq_msg_t *msg_)
|
|||||||
|
|
||||||
void zmq::session_t::flush ()
|
void zmq::session_t::flush ()
|
||||||
{
|
{
|
||||||
out_pipe->flush ();
|
if (out_pipe)
|
||||||
|
out_pipe->flush ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void zmq::session_t::detach ()
|
void zmq::session_t::detach ()
|
||||||
|
@ -60,9 +60,13 @@ bool zmq::zmq_connecter_init_t::read (::zmq_msg_t *msg_)
|
|||||||
if (!session_name.empty ())
|
if (!session_name.empty ())
|
||||||
session = owner->find_session (session_name.c_str ());
|
session = owner->find_session (session_name.c_str ());
|
||||||
if (!session) {
|
if (!session) {
|
||||||
// TODO
|
|
||||||
|
// TODO:
|
||||||
|
// The socket is already closing. The session is already shut down,
|
||||||
|
// so no point in continuing with connecting. Shut the connection down.
|
||||||
zmq_assert (false);
|
zmq_assert (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
send_attach (session, engine);
|
send_attach (session, engine);
|
||||||
engine = NULL;
|
engine = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user