Skip to content

Commit

Permalink
修复并发工作回调返回值问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Jan 10, 2019
1 parent 2dcbc4c commit b7a2f25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Aspect/WorkerLimitAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ public function parse(AroundJoinPoint $joinPoint)
if(null === $blockingConsumer)
{
$result = WorkerLimiter::call(function() use($joinPoint){
$joinPoint->proceed();
return $joinPoint->proceed();
}, $workerLimit->name, $workerLimit->max, $workerLimit->timeout, $workerLimit->callback, $workerLimit->poolName);
}
else
{
$result = WorkerLimiter::callBlock(function() use($joinPoint){
$joinPoint->proceed();
return $joinPoint->proceed();
}, $workerLimit->name, $workerLimit->max, $workerLimit->timeout, $blockingConsumer->timeout, $workerLimit->callback, $workerLimit->poolName);
}
return $result;
Expand Down

0 comments on commit b7a2f25

Please sign in to comment.