Skip to content

Commit 24524b2

Browse files
author
niulingyun
committed
改为调用方法
1 parent 81619b9 commit 24524b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Coroutine/Sleep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Sleep extends Base
2222
*/
2323
public function goSleep(int $mSec)
2424
{
25-
$this->timeout = $mSec + 1000; //协程超时时间要比睡眠时间更长
2625
$this->__sleepTime = $mSec;
2726
$this->requestId = $this->getContext()->getLogId();
27+
$this->setTimeout($mSec + 1000); //协程超时时间要比睡眠时间更长
2828

2929
getInstance()->scheduler->IOCallBack[$this->requestId][] = $this;
3030
$keys = array_keys(getInstance()->scheduler->IOCallBack[$this->requestId]);

0 commit comments

Comments
 (0)