改名
This commit is contained in:
@@ -317,8 +317,8 @@ class Connection extends Component
|
||||
public function disconnect()
|
||||
{
|
||||
$connections = $this->connections();
|
||||
$connections->disconnect($this->cds);
|
||||
$connections->disconnect($this->slaveConfig['cds']);
|
||||
$connections->disconnect($this->cds, true);
|
||||
$connections->disconnect($this->slaveConfig['cds'], false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,8 +35,9 @@ abstract class Callback extends HttpService
|
||||
try {
|
||||
fire(Event::SYSTEM_RESOURCE_CLEAN);
|
||||
|
||||
\logger()->insert();
|
||||
|
||||
Snowflake::clearProcessId($server->worker_pid);
|
||||
Timer::clearAll();
|
||||
|
||||
$logger = Snowflake::app()->getLogger();
|
||||
$logger->write($this->_MESSAGE[$message] . $worker_id);
|
||||
|
||||
@@ -280,14 +280,15 @@ class Connection extends Pool
|
||||
|
||||
/**
|
||||
* @param $coroutineName
|
||||
* @param bool $isMaster
|
||||
* @throws Exception
|
||||
*/
|
||||
public function disconnect($coroutineName)
|
||||
public function disconnect($coroutineName, $isMaster = false)
|
||||
{
|
||||
if (!$this->hasClient($coroutineName)) {
|
||||
return;
|
||||
}
|
||||
$coroutineName = $this->name($coroutineName, $isMaster);
|
||||
if ($this->hasClient($coroutineName)) {
|
||||
$this->remove($coroutineName);
|
||||
}
|
||||
$this->clean($coroutineName);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,13 +104,11 @@ class Redis extends Pool
|
||||
{
|
||||
$name = $config['host'] . ':' . $config['prefix'] . ':' . $config['databases'];
|
||||
$coroutineName = $this->name('redis', 'redis:' . $name, $isMaster);
|
||||
if (!Context::hasContext($coroutineName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Context::hasContext($coroutineName)) {
|
||||
$this->desc($coroutineName);
|
||||
|
||||
$this->remove($coroutineName);
|
||||
}
|
||||
$this->clean($coroutineName);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user