Skip to content

Commit 0203b71

Browse files
committed
Make end stop immediately when no requests are pending
1 parent 20f3126 commit 0203b71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Redis/Redis.php

+4
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ public function end()
238238
{
239239
return Promise::doReject(new WriteException('Tried to double end same connection.'));
240240
}
241+
if (!$this->isBusy())
242+
{
243+
return $this->stop();
244+
}
241245

242246
$promise = new Promise();
243247
$this->isBeingDisconnected = true;

0 commit comments

Comments
 (0)