protected function isTunnelOpen(array $tunnel)
    {
        foreach ($this->getTunnelInfo() as $info) {
            if ($this->tunnelsAreEqual($tunnel, $info)) {
                /** @noinspection PhpComposerExtensionStubsInspection */
                if (isset($info['pid']) && function_exists('posix_kill') && !posix_kill($info['pid'], 0)) {
                    $this->debug(sprintf(
                        'The tunnel at port %d is no longer open, removing from list',
                        $info['localPort']
                    ));
                    $this->closeTunnel($info);
                    continue;
                }

                return $info;
            }
        }

        return false;
    }