Removed useless code.

This commit is contained in:
李铭昕 2020-03-26 19:02:14 +08:00
parent 7c1564856b
commit e163dd4b56
2 changed files with 1 additions and 8 deletions

View File

@ -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);
} }

View File

@ -19,6 +19,5 @@ class HandlerStackFactoryStub extends HandlerStackFactory
public function __construct() public function __construct()
{ {
$this->usePoolHandler = false; $this->usePoolHandler = false;
$this->useMake = true;
} }
} }