Skip to content

Commit

Permalink
fix: invalid interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Reasno authored and limingxinleo committed Apr 1, 2021
1 parent 49b8f4a commit 1c36711
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socketio-server/src/BaseNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
use Hyperf\SocketIOServer\Parser\Engine;
use Hyperf\SocketIOServer\Parser\Packet;
use Hyperf\SocketIOServer\Room\AdapterInterface;
use Hyperf\SocketIOServer\Room\EphemeralInterface;
use Hyperf\SocketIOServer\SidProvider\SidProviderInterface;
use Hyperf\Utils\ApplicationContext;
use Hyperf\WebSocketServer\Sender;
use HyperfTest\SocketIOServer\Stub\EphemeralAdapter;

class BaseNamespace implements NamespaceInterface
{
Expand All @@ -35,7 +35,7 @@ public function __construct(Sender $sender, SidProviderInterface $sidProvider)
{
/* @var AdapterInterface adapter */
$this->adapter = make(AdapterInterface::class, ['sender' => $sender, 'nsp' => $this]);
if ($this->adapter instanceof EphemeralAdapter) {
if ($this->adapter instanceof EphemeralInterface) {
$this->adapter = $this->adapter->setTtl(
SocketIOConfig::getPingInterval() + SocketIOConfig::getPingTimeout()
);
Expand Down

0 comments on commit 1c36711

Please sign in to comment.