Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Jan 2, 2024
1 parent 65f5f94 commit 587c42c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/CacheConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ public function connect(Connection $connection): void
*/
public function find(string $id): ?Connection
{
$connections = $this->get();
return $this->mutex(function () use ($id) {
$connections = $this->get();

if (! isset($connections[$id])) {
return null;
}
if (! isset($connections[$id])) {
return null;
}

return unserialize($connections[$id]);
return unserialize($connections[$id]);
});
}

/**
Expand Down

0 comments on commit 587c42c

Please sign in to comment.