diff --git a/core-tests/src/server/server.cpp b/core-tests/src/server/server.cpp index 0648801c164..2a00bb8c284 100644 --- a/core-tests/src/server/server.cpp +++ b/core-tests/src/server/server.cpp @@ -1079,7 +1079,7 @@ TEST(server, reopen_log) { return; } EXPECT_TRUE(access(filename.c_str(), R_OK) != -1); - remove(filename.c_str()); + unlink(filename.c_str()); EXPECT_TRUE(access(filename.c_str(), R_OK) == -1); kill(serv->gs->master_pid, SIGRTMIN); sleep(2); diff --git a/src/os/process_pool.cc b/src/os/process_pool.cc index 75be46df47e..062bb24ec90 100644 --- a/src/os/process_pool.cc +++ b/src/os/process_pool.cc @@ -544,6 +544,10 @@ static int ProcessPool_worker_loop_with_task_protocol(ProcessPool *pool, Worker out.mtype = worker->id + 1; } + if (worker->pipe_worker) { + worker->pipe_worker->set_block(); + } + while (pool->running && !SwooleWG.shutdown && task_n > 0) { /** * fetch task @@ -573,7 +577,7 @@ static int ProcessPool_worker_loop_with_task_protocol(ProcessPool *pool, Worker } else { n = worker->pipe_worker->read(&out.buf, sizeof(out.buf)); if (n < 0 && errno != EINTR) { - swoole_sys_warning("[Worker#%d] read(%d) failed", worker->id, worker->pipe_worker->fd); + swoole_sys_warning("read(%d) failed", worker->pipe_worker->fd); } } diff --git a/src/protocol/dtls.cc b/src/protocol/dtls.cc index 33381c114a4..e9442529ece 100644 --- a/src/protocol/dtls.cc +++ b/src/protocol/dtls.cc @@ -103,6 +103,12 @@ long BIO_ctrl(BIO *b, int cmd, long lval, void *ptrval) { case BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT: retval = 0; break; +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + case BIO_CTRL_GET_KTLS_SEND: + case BIO_CTRL_GET_KTLS_RECV: + retval = 0; + break; +#endif default: swoole_warning("unknown cmd: %d", cmd); retval = 0; diff --git a/src/server/reactor_thread.cc b/src/server/reactor_thread.cc index c677732e50c..bfe5130a648 100644 --- a/src/server/reactor_thread.cc +++ b/src/server/reactor_thread.cc @@ -761,7 +761,9 @@ int ReactorThread::init(Server *serv, Reactor *reactor, uint16_t reactor_id) { } if (serv->pipe_command) { - pipe_command = message_bus.get_pipe_socket(serv->pipe_command->get_socket(false)); + auto pipe_socket = serv->pipe_command->get_socket(false); + message_bus.init_pipe_socket(pipe_socket); + pipe_command = message_bus.get_pipe_socket(pipe_socket); pipe_command->buffer_size = UINT_MAX; }