Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

Commit 5d106b5

Browse files
Made the timeout non-optional
1 parent 65e30c7 commit 5d106b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Http/Middleware/LockingMiddleware.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function handle($request, Closure $next)
6565
$name = 'session-'.$request->session()->getId();
6666

6767
try {
68-
$response = $this->locker->execute($function, $name);
68+
$response = $this->locker->execute($function, $name, 20000);
6969
} catch (UnableToAcquireLockException $e) {
7070
throw new UnprocessableEntityHttpException('Unable to acquire lock.');
7171
}

src/Locker.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(ClientInterface $redis)
5858
*
5959
* @return mixed
6060
*/
61-
public function execute(Closure $function, $name, $timeout = 20000, $play = 500, $interval = 100, $trys = 128)
61+
public function execute(Closure $function, $name, $timeout, $play = 500, $interval = 100, $trys = 128)
6262
{
6363
$lock = new Lock($this->redis, $name, $timeout, $play, $interval, $trys);
6464

0 commit comments

Comments
 (0)