Skip to content

Commit

Permalink
fix tests [3]
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Aug 15, 2024
1 parent 4352cea commit 8ca2cf6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core-tests/src/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 5 additions & 1 deletion src/os/process_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/protocol/dtls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion src/server/reactor_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8ca2cf6

Please sign in to comment.