Skip to content

Commit 8377361

Browse files
authored
Merge pull request #47 from michalsn/fix-reconnect
Add an additional condition before `reconnect()`
2 parents 7cccd8e + e0a7043 commit 8377361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/QueueJobModel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getFromQueue(string $name, array $priority): ?QueueJob
5151
{
5252
// For SQLite3 memory database this will cause problems
5353
// so check if we're not in the testing environment first.
54-
if ($this->db->database !== ':memory:') {
54+
if ($this->db->database !== ':memory:' && $this->db->connID !== false) {
5555
// Make sure we still have the connection
5656
$this->db->reconnect();
5757
}

0 commit comments

Comments
 (0)