mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 09:53:51 +00:00
Set up hwm's before we connect the other end of the pipe in ctx_t::connect_inproc_sockets
This commit is contained in:
parent
764a3495c6
commit
c9e86acf61
19
src/ctx.cpp
19
src/ctx.cpp
@ -454,15 +454,6 @@ void zmq::ctx_t::connect_inproc_sockets (zmq::socket_base_t *bind_socket_,
|
|||||||
errno_assert (rc == 0);
|
errno_assert (rc == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (side_ == bind_side) {
|
|
||||||
command_t cmd;
|
|
||||||
cmd.type = command_t::bind;
|
|
||||||
cmd.args.bind.pipe = pending_connection_.bind_pipe;
|
|
||||||
bind_socket_->process_command(cmd);
|
|
||||||
bind_socket_->send_inproc_connected(pending_connection_.endpoint.socket);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pending_connection_.connect_pipe->send_bind(bind_socket_, pending_connection_.bind_pipe, false);
|
|
||||||
|
|
||||||
int sndhwm = 0;
|
int sndhwm = 0;
|
||||||
if (pending_connection_.endpoint.options.sndhwm != 0 && bind_options.rcvhwm != 0)
|
if (pending_connection_.endpoint.options.sndhwm != 0 && bind_options.rcvhwm != 0)
|
||||||
@ -483,6 +474,16 @@ void zmq::ctx_t::connect_inproc_sockets (zmq::socket_base_t *bind_socket_,
|
|||||||
pending_connection_.connect_pipe->set_hwms(hwms [1], hwms [0]);
|
pending_connection_.connect_pipe->set_hwms(hwms [1], hwms [0]);
|
||||||
pending_connection_.bind_pipe->set_hwms(hwms [0], hwms [1]);
|
pending_connection_.bind_pipe->set_hwms(hwms [0], hwms [1]);
|
||||||
|
|
||||||
|
if (side_ == bind_side) {
|
||||||
|
command_t cmd;
|
||||||
|
cmd.type = command_t::bind;
|
||||||
|
cmd.args.bind.pipe = pending_connection_.bind_pipe;
|
||||||
|
bind_socket_->process_command (cmd);
|
||||||
|
bind_socket_->send_inproc_connected (pending_connection_.endpoint.socket);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pending_connection_.connect_pipe->send_bind (bind_socket_, pending_connection_.bind_pipe, false);
|
||||||
|
|
||||||
if (pending_connection_.endpoint.options.recv_identity) {
|
if (pending_connection_.endpoint.options.recv_identity) {
|
||||||
msg_t id;
|
msg_t id;
|
||||||
int rc = id.init_size (bind_options.identity_size);
|
int rc = id.init_size (bind_options.identity_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user