Skip to content

Commit 9dde35b

Browse files
authored
Fix infinite recursion
1 parent a4c4248 commit 9dde35b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Traits/RequestTrait.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ protected function handleGrpcStatus($service, $method, $status)
171171
(isset(self::$grpcExceptions[$status->code])?self::$grpcNames[$status->code]:$status->code)
172172
.' ' . $status->code . '): ' . ($status->details ?? 'no details');
173173
$this->logger->error($message);
174-
try{
175-
$this->ydb->discover();
176-
}catch (\Exception $e){}
174+
if (get_class($this)!==Discovery::class){
175+
try{
176+
$this->ydb->discover();
177+
}catch (\Exception $e){}
178+
}
177179
$endpoint = $this->ydb->endpoint();
178180
if ($this->ydb->needDiscovery()){
179181
$endpoint = $this->ydb->cluster()->all()[array_rand($this->ydb->cluster()->all())]->endpoint();

0 commit comments

Comments
 (0)