Skip to content

Commit 294ad69

Browse files
committed
Fix bug with connection creation and request waiting
1 parent a59e06a commit 294ad69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/AbstractPool.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@ private function pop(): \Generator {
134134
++$this->pending;
135135
try {
136136
$this->promise = $this->createConnection();
137-
$this->addConnection(yield $this->promise);
137+
$connection = yield $this->promise;
138138
} finally {
139139
if (--$this->pending === 0) {
140140
$this->promise = null;
141141
}
142142
}
143+
144+
$this->connections->attach($connection);
145+
return $connection;
143146
}
144147
}
145148

0 commit comments

Comments
 (0)