Skip to content

Commit 792b240

Browse files
authored
Merge pull request #37 from lvluoyue/master
fix proxy bug
2 parents ccbf54f + 954bc97 commit 792b240

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/ConnectionPool.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,18 @@ public function closeTimeoutConnection(): void
218218
*/
219219
protected function create($address, bool $ssl = false, string $proxy = ''): AsyncTcpConnection
220220
{
221-
$context = array(
222-
'ssl' => array(
221+
$context = [
222+
'ssl' => [
223223
'verify_peer' => false,
224224
'verify_peer_name' => false,
225225
'allow_self_signed' => true
226-
),
227-
'http' => array(
228-
'proxy' => $proxy
229-
),
230-
);
226+
],
227+
'http' => [
228+
'proxy' => $proxy,
229+
]
230+
];
231231
if (!empty( $this->options['context'])) {
232-
$context = $this->options['context'];
232+
$context = array_merge($context, $this->options['context']);
233233
}
234234
if (!$ssl) {
235235
unset($context['ssl']);

0 commit comments

Comments
 (0)