Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
limingxinleo committed Jun 2, 2021
2 parents e259e67 + a88e02b commit bdf5396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/IO/SwooleIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class SwooleIO extends AbstractIO
protected $heartbeat;

/**
* @var Channel
* @var null|Channel
*/
protected $pushChannel;

Expand Down Expand Up @@ -214,8 +214,8 @@ public function check_heartbeat()
public function close()
{
$this->log('Connection closed, wait to restart in next time.');
$this->pushChannel->close();
$this->sock->close();
$this->pushChannel && $this->pushChannel->close();
$this->sock && $this->sock->close();
}

public function select($sec, $usec)
Expand Down

0 comments on commit bdf5396

Please sign in to comment.