mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 03:47:53 +08:00
fixed one urgent bug in acl_read_wait
This commit is contained in:
parent
835e3a215f
commit
67e6bd0470
@ -1,3 +1,7 @@
|
|||||||
|
9) 2015.12.21
|
||||||
|
9.1) bugfix: master_threads.cpp 中的函数 proc_exit_timer 在只有当 nclients 为0
|
||||||
|
时才允许退出
|
||||||
|
|
||||||
8) 2015.6.22
|
8) 2015.6.22
|
||||||
8.1) comment: 向导生成的服务器工程中的 main 源程序中增加了注释,指明使用方法
|
8.1) comment: 向导生成的服务器工程中的 main 源程序中增加了注释,指明使用方法
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void master_service::proc_on_exit()
|
|||||||
|
|
||||||
bool master_service::proc_exit_timer(size_t nclients, size_t nthreads)
|
bool master_service::proc_exit_timer(size_t nclients, size_t nthreads)
|
||||||
{
|
{
|
||||||
if (nclients == 0 || nthreads == 0)
|
if (nclients == 0)
|
||||||
{
|
{
|
||||||
logger("clients count: %d, threads count: %d",
|
logger("clients count: %d, threads count: %d",
|
||||||
(int) nclients, (int) nthreads);
|
(int) nclients, (int) nthreads);
|
||||||
|
@ -95,7 +95,7 @@ void master_service::proc_on_init()
|
|||||||
|
|
||||||
bool master_service::proc_exit_timer(size_t nclients, size_t nthreads)
|
bool master_service::proc_exit_timer(size_t nclients, size_t nthreads)
|
||||||
{
|
{
|
||||||
if (nclients == 0 || nthreads == 0)
|
if (nclients == 0)
|
||||||
{
|
{
|
||||||
logger("clients count: %d, threads count: %d",
|
logger("clients count: %d, threads count: %d",
|
||||||
(int) nclients, (int) nthreads);
|
(int) nclients, (int) nthreads);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
修改历史列表:
|
修改历史列表:
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
92) 2015.12.21 --- acl 3.1.4.2 版本发布!(修复了一处紧急 BUG)
|
||||||
91) 2015.12.21 --- acl 3.1.4.1 版本发布!(修复了几处紧急 BUG)
|
91) 2015.12.21 --- acl 3.1.4.1 版本发布!(修复了几处紧急 BUG)
|
||||||
90) 2015.12.20 --- acl 3.1.4 版本发布!
|
90) 2015.12.20 --- acl 3.1.4 版本发布!
|
||||||
89) 2015.11.4
|
89) 2015.11.4
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
调用系统 API read,否则会形成死循环
|
调用系统 API read,否则会形成死循环
|
||||||
520.2) bugfix: event 事件引擎应该区分监听描述字和一般套接字,有的地方未给
|
520.2) bugfix: event 事件引擎应该区分监听描述字和一般套接字,有的地方未给
|
||||||
监听套接字 listener 置 1,这样会造成死循环
|
监听套接字 listener 置 1,这样会造成死循环
|
||||||
|
520.3) bugfix: acl_read_wait 函数中使用 epoll 的方式有问题,会造成死循环
|
||||||
|
|
||||||
519) 2015.12.20
|
519) 2015.12.20
|
||||||
519.1) feature: acl_aio.c 增加了设置检查所有套接字状态的时间间隔函数
|
519.1) feature: acl_aio.c 增加了设置检查所有套接字状态的时间间隔函数
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
|
|
||||||
static char *version = "acl_3.1.4";
|
static char *version = "acl_3.1.4.2";
|
||||||
|
|
||||||
const char *acl_version(void)
|
const char *acl_version(void)
|
||||||
{
|
{
|
||||||
|
@ -87,10 +87,10 @@ int acl_read_wait(ACL_SOCKET fd, int timeout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
switch (epoll_wait(*epoll_fd, events, 1, delay)) {
|
ret = epoll_wait(*epoll_fd, events, 1, delay);
|
||||||
case -1:
|
|
||||||
if (acl_last_error() == ACL_EINTR)
|
if (ret == -1) {
|
||||||
{
|
if (acl_last_error() == ACL_EINTR) {
|
||||||
acl_msg_warn(">>>>catch EINTR, try again<<<");
|
acl_msg_warn(">>>>catch EINTR, try again<<<");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -99,11 +99,11 @@ int acl_read_wait(ACL_SOCKET fd, int timeout)
|
|||||||
myname, __LINE__, acl_last_serror(), fd);
|
myname, __LINE__, acl_last_serror(), fd);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
case 0:
|
} else if (ret == 0) {
|
||||||
acl_set_error(ACL_ETIMEDOUT);
|
acl_set_error(ACL_ETIMEDOUT);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
break;
|
break;
|
||||||
default:
|
} else {
|
||||||
if ((events[0].events & (EPOLLERR | EPOLLHUP)) != 0)
|
if ((events[0].events & (EPOLLERR | EPOLLHUP)) != 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
else if ((events[0].events & EPOLLIN) == 0) {
|
else if ((events[0].events & EPOLLIN) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user