This commit is contained in:
2021-02-15 16:09:36 +08:00
parent 727d9aa216
commit 5b8d424144
+2 -2
View File
@@ -7,6 +7,7 @@ namespace Snowflake\Abstracts;
use Exception; use Exception;
use HttpServer\Http\Context; use HttpServer\Http\Context;
use JetBrains\PhpStorm\Pure;
use PDO; use PDO;
use Redis; use Redis;
use Swoole\Coroutine; use Swoole\Coroutine;
@@ -72,7 +73,7 @@ abstract class Pool extends Component
* @param false $isMaster * @param false $isMaster
* @return string * @return string
*/ */
public function name($cds, $isMaster = false): string #[Pure] public function name($cds, $isMaster = false): string
{ {
if ($isMaster === true) { if ($isMaster === true) {
return hash('sha256', $cds . 'master'); return hash('sha256', $cds . 'master');
@@ -186,7 +187,6 @@ abstract class Pool extends Component
if (!$this->_items[$name]->isFull()) { if (!$this->_items[$name]->isFull()) {
$this->_items[$name]->push([time(), $client]); $this->_items[$name]->push([time(), $client]);
} }
unset($client);
} }