mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
Problem: xpub_t.xattach_pipe no handle msg.copy or pipe_t.write fails.
This commit is contained in:
parent
6436bc51e6
commit
1dd9cac24d
@ -65,14 +65,15 @@ void zmq::xpub_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
|
||||
if (subscribe_to_all_)
|
||||
subscriptions.add (NULL, 0, pipe_);
|
||||
|
||||
// if welcome message exist
|
||||
// if welcome message exists, send a copy of it
|
||||
if (welcome_msg.size () > 0)
|
||||
{
|
||||
msg_t copy;
|
||||
copy.init ();
|
||||
copy.copy(welcome_msg);
|
||||
|
||||
pipe_->write(©);
|
||||
int rc = copy.copy (welcome_msg);
|
||||
errno_assert (rc == 0);
|
||||
bool ok = pipe_->write (©);
|
||||
zmq_assert (ok);
|
||||
pipe_->flush ();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user