mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-02 11:48:08 +08:00
Removed useless code.
This commit is contained in:
parent
7c1564856b
commit
e163dd4b56
@ -42,15 +42,9 @@ class HandlerStackFactory
|
|||||||
*/
|
*/
|
||||||
protected $usePoolHandler = false;
|
protected $usePoolHandler = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
protected $useMake = false;
|
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
if (class_exists(ApplicationContext::class)) {
|
if (class_exists(ApplicationContext::class)) {
|
||||||
$this->useMake = true;
|
|
||||||
$this->usePoolHandler = class_exists(PoolFactory::class) && ApplicationContext::getContainer() instanceof Container;
|
$this->usePoolHandler = class_exists(PoolFactory::class) && ApplicationContext::getContainer() instanceof Container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -89,7 +83,7 @@ class HandlerStackFactory
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->useMake) {
|
if (class_exists(ApplicationContext::class)) {
|
||||||
return make(CoroutineHandler::class);
|
return make(CoroutineHandler::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,5 @@ class HandlerStackFactoryStub extends HandlerStackFactory
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->usePoolHandler = false;
|
$this->usePoolHandler = false;
|
||||||
$this->useMake = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user