private function startHeartbeat()
{
if ($this->hTimer === null && $this->flags['enableHeartbeat']) {
$proxy = $this;
$this->hTimer = $this->loop->addPeriodicTimer($this->options['heartbeatInterval'] / 1000, function () use($proxy) {
if ($proxy->type === self::CONNECTOR) {
foreach ($proxy->hosts as $hostid) {
$proxy->heartbeat($hostid);
}
}
$this->clearConnectionPool();
});
}
}