Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Sep 13, 2024
1 parent 573a67e commit ff01b0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/server/master.cc
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,9 @@ void Server::stop_master_thread() {
if (port->is_dgram() and is_process_mode()) {
continue;
}
reactor->del(port->socket);
if (!port->socket->removed) {
reactor->del(port->socket);
}
}
if (pipe_command) {
reactor->del(pipe_command->get_socket(true));
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 @@ -310,7 +310,9 @@ void ReactorThread::shutdown(Reactor *reactor) {
if (ls->socket->fd % serv->reactor_num != reactor->id) {
continue;
}
reactor->del(ls->socket);
if (!ls->socket->removed) {
reactor->del(ls->socket);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/task/finish_timeout.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ unlink(TMP_LOG_FILE);
?>
--EXPECTF--
[%s] WARNING Socket::send_blocking(): send %d bytes failed, Error: Resource temporarily unavailable[11]
[%s] WARNING Server::reply_task_result() (ERRNO %d): send result to worker timed out
[%s] WARNING Server::finish() (ERRNO %d): send result to worker timed out

0 comments on commit ff01b0f

Please sign in to comment.