diff --git a/ext-src/swoole_curl.cc b/ext-src/swoole_curl.cc index 2b4da3ca74b..dc115295b37 100644 --- a/ext-src/swoole_curl.cc +++ b/ext-src/swoole_curl.cc @@ -159,13 +159,8 @@ CURLcode Multi::exec(php_curl *ch) { Handle *handle = get_handle(ch->cp); - Coroutine::CancelFunc cancel_fn = [](Coroutine *co) { - co->resume(); - return true; - }; - SW_LOOP { - co->yield(&cancel_fn); + co->yield_ex(-1); if (co->is_canceled()) { swoole_set_last_error(SW_ERROR_CO_CANCELED); break; diff --git a/src/server/reactor_thread.cc b/src/server/reactor_thread.cc index 0ea0e3ff442..042391bc6d9 100644 --- a/src/server/reactor_thread.cc +++ b/src/server/reactor_thread.cc @@ -416,7 +416,7 @@ static int ReactorThread_onPipeRead(Reactor *reactor, Event *ev) { SW_ERROR_SESSION_NOT_EXIST, "force close connection failed, session#%ld does not exist", session_id); - return SW_ERR; + return SW_OK; } if (serv->disable_notify || conn->close_force) {