Describe the bug
when use broker on service return too slow, then it happend return Error!!!
just like this:
Return value of App\Rpc\Lib\UserInterface_IGNORE_5fe2a4025d599::delete() must be of the type boolean, array returned
Expected behavior
quckly click refresh browser, it happend.
Screenshots
Return value of App\Rpc\Lib\UserInterface_IGNORE_5fe2a4025d599::delete() must be of the type boolean, array returned
Details
Describe what you are trying to achieve and what goes wrong.
/**
* 获取列表
* @Breaker(fallback="testList")
*
* @param int $id
* @param mixed $type
* @param int $count
*
* @return array
*/
public function getList(int $id, $type, int $count = 10): array
{
echo 'getList->[]'."\n";
return [];
}
public function testList(int $id, $type, int $count = 10)
{
echo 'getList->testList->[]'."\n";
return [];
}
/**
* 删除
*
* @Breaker(fallback="testDelete")
*
* @param int $id
*
* @return mixed
*/
public function delete(int $id, $isSleep=0) :bool
{
throw new \Exception('test');
echo 'xxxxxxxxxxxxxxxxxx->error';
return false;
}
/**
* @return int
*/
public function testDelete(int $id, $isSleep=0) :bool
{
echo 'delete->testDelete->';
if($isSleep){
echo "\n";
}
$isSleep && sleep($isSleep);
echo 'false'."\n";
return false;
}
Describe the bug when use broker on service return too slow, then it happend return Error!!! just like this: Return value of App\Rpc\Lib\UserInterface_IGNORE_5fe2a4025d599::delete() must be of the type boolean, array returned
Expected behavior quckly click refresh browser, it happend.
Screenshots Return value of App\Rpc\Lib\UserInterface_IGNORE_5fe2a4025d599::delete() must be of the type boolean, array returned
Details