改名
This commit is contained in:
@@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user