Skip to content

Commit 4bc10a7

Browse files
committed
[fix] pzmq creat error
1 parent cc1087f commit 4bc10a7

File tree

1 file changed

+2
-3
lines changed
  • ext_components/StackFlow/stackflow

1 file changed

+2
-3
lines changed

ext_components/StackFlow/stackflow/pzmq.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class pzmq {
127127
if ((url[0] != 'i') && (url[1] != 'p')) {
128128
rpc_url_head_.clear();
129129
}
130-
if (mode_ != ZMQ_RPC_FUN) creat(url, raw_call);
130+
creat(url, raw_call);
131131
}
132132
void set_timeout(int ms)
133133
{
@@ -179,8 +179,6 @@ class pzmq {
179179
if (zmq_fun_.empty()) {
180180
std::string url = rpc_url_head_ + rpc_server_;
181181
mode_ = ZMQ_RPC_FUN;
182-
zmq_fun_["list_action"] =
183-
std::bind(&pzmq::_rpc_list_action, this, std::placeholders::_1, std::placeholders::_2);
184182
ret = creat(url);
185183
}
186184
zmq_fun_[action] = raw_call;
@@ -330,6 +328,7 @@ class pzmq {
330328
inline int creat_rep(const std::string &url, const msg_callback_fun &raw_call)
331329
{
332330
int ret = zmq_bind(zmq_socket_, url.c_str());
331+
zmq_fun_["list_action"] = std::bind(&pzmq::_rpc_list_action, this, std::placeholders::_1, std::placeholders::_2);
333332
flage_ = false;
334333
zmq_thread_ = std::make_unique<std::thread>(std::bind(&pzmq::zmq_event_loop, this, raw_call));
335334
return ret;

0 commit comments

Comments
 (0)