mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-29 18:27:44 +08:00
Fixed bug that process does not works in swow server. (#2741)
* Fixed bug that process does not works in swow server. * Update CHANGELOG-2.1.md
This commit is contained in:
parent
d0db944c9b
commit
5cab34c07b
@ -44,3 +44,7 @@
|
||||
|
||||
- [#2659](https://github.com/hyperf/hyperf/pull/2659) [#2663](https://github.com/hyperf/hyperf/pull/2663) Support `HttpServer` for [Swow](https://github.com/swow/swow).
|
||||
- [#2671](https://github.com/hyperf/hyperf/pull/2671) Added `Hyperf\AsyncQueue\Listener\QueueHandleListener` which can record running logs for async-queue.
|
||||
|
||||
## Fixed
|
||||
|
||||
- [#2741](https://github.com/hyperf/hyperf/pull/2741) Fixed bug that process does not works in swow server.
|
||||
|
@ -13,6 +13,7 @@ namespace Hyperf\Process;
|
||||
|
||||
use Hyperf\Contract\ProcessInterface;
|
||||
use Hyperf\Contract\StdoutLoggerInterface;
|
||||
use Hyperf\Engine\Constant;
|
||||
use Hyperf\ExceptionHandler\Formatter\FormatterInterface;
|
||||
use Hyperf\Process\Event\AfterCoroutineHandle;
|
||||
use Hyperf\Process\Event\AfterProcessHandle;
|
||||
@ -21,7 +22,6 @@ use Hyperf\Process\Event\BeforeProcessHandle;
|
||||
use Hyperf\Process\Event\PipeMessage;
|
||||
use Hyperf\Process\Exception\ServerInvalidException;
|
||||
use Hyperf\Process\Exception\SocketAcceptException;
|
||||
use Hyperf\Server\CoroutineServer;
|
||||
use Hyperf\Utils\Coordinator\Constants;
|
||||
use Hyperf\Utils\Coordinator\CoordinatorManager;
|
||||
use Hyperf\Utils\Coroutine;
|
||||
@ -105,7 +105,7 @@ abstract class AbstractProcess implements ProcessInterface
|
||||
|
||||
public function bind($server): void
|
||||
{
|
||||
if (CoroutineServer::isCoroutineServer($server)) {
|
||||
if (Constant::isCoroutineServer($server)) {
|
||||
$this->bindCoroutineServer($server);
|
||||
return;
|
||||
}
|
||||
|
@ -108,6 +108,9 @@ class CoroutineServer implements ServerInterface
|
||||
return $this->server;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated v2.2
|
||||
*/
|
||||
public static function isCoroutineServer($server): bool
|
||||
{
|
||||
return $server instanceof Coroutine\Http\Server || $server instanceof Coroutine\Server;
|
||||
|
Loading…
Reference in New Issue
Block a user