Skip to content

Commit 3a82f7a

Browse files
committed
Fixed #397.
1 parent 47ba54f commit 3a82f7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/reactor/ReactorBase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static void swReactor_onTimeout_and_Finish(swReactor *reactor)
207207
//client exit
208208
if (SwooleG.timer.num <= 0)
209209
{
210-
if (reactor->event_num == 1 && SwooleAIO.task_num == 1)
210+
if (SwooleAIO.init && reactor->event_num == 1 && SwooleAIO.task_num == 0)
211211
{
212212
reactor->running = 0;
213213
}

swoole_async.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ PHP_FUNCTION(swoole_async_read)
370370

371371
swHashMap_add_int(php_swoole_aio_request, fd, req);
372372
php_swoole_check_aio();
373-
SW_CHECK_RETURN(SwooleAIO.read(fd, fcnt, buf_size, 0));
373+
SW_CHECK_RETURN(SwooleAIO.read(fd, fcnt, buf_size, offset));
374374
RETURN_TRUE;
375375
}
376376

0 commit comments

Comments
 (0)