Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yf committed Dec 14, 2018
1 parent 9cda2d2 commit 5c96977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pool/AbstractPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ public static function invoke(callable $call,float $timeout = null)
if($obj){
try{
$ret = call_user_func($call,$obj);
$pool->recycleObj($obj);
return $ret;
}catch (\Throwable $throwable){
$pool->recycleObj($obj);
throw $throwable;
}finally{
$pool->recycleObj($obj);
}
}else{
throw new PoolEmpty(static::class." pool is empty");
Expand Down

0 comments on commit 5c96977

Please sign in to comment.