diff --git a/ext-src/swoole_server.cc b/ext-src/swoole_server.cc index dda63689b5e..a1edd9fafff 100644 --- a/ext-src/swoole_server.cc +++ b/ext-src/swoole_server.cc @@ -207,7 +207,7 @@ static void server_free_object(zend_object *object) { delete property; zend_object_std_dtor(object); - if (serv && serv->is_master()) { + if (serv && ((serv->is_process_mode() && serv->is_master()) || serv->is_base_mode())) { delete serv; } }