From 531d7c8a783ac6a4262bdbe508800202de3f8dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 13 Aug 2021 16:41:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Pool/Connection.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index 602a5e2a..1a864673 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -117,11 +117,6 @@ class Connection extends Component public function create($coroutineName, $config): Closure { return static function () use ($coroutineName, $config) { - if (Coroutine::getCid() === -1) { - Runtime::enableCoroutine(false); - } - debug('mysql connect startTime ' . microtime(true)); - $cds = 'mysql:dbname=' . $config['database'] . ';host=' . $config['cds']; $link = new PDO($cds, $config['username'], $config['password'], [ PDO::ATTR_EMULATE_PREPARES => false, @@ -133,8 +128,6 @@ class Connection extends Component $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $link->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); $link->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_EMPTY_STRING); - - debug('mysql connect endTime ' . microtime(true)); return $link; }; }