Skip to content

Commit abe69ad

Browse files
authored
Fix for creating a stream context from a custom user parameters (#711)
* Fix custom connection parameters usage for a ssl_context option * Fix custom connection parameters usage for a ssl_context option to properly create stream context
1 parent 3a082c1 commit abe69ad

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

RabbitMq/AMQPConnectionFactory.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,17 @@ public function __construct(
5353

5454
$this->parameters['hosts'][$key] = $this->parseUrl($hostParameters);
5555
}
56-
56+
57+
if ($parametersProvider) {
58+
$this->parameters = array_merge($this->parameters, $parametersProvider->getConnectionParameters());
59+
}
60+
5761
if (is_array($this->parameters['ssl_context'])) {
5862
$this->parameters['context'] = !empty($this->parameters['ssl_context'])
5963
? stream_context_create(['ssl' => $this->parameters['ssl_context']])
6064
: null;
6165
}
62-
if ($parametersProvider) {
63-
$this->parameters = array_merge($this->parameters, $parametersProvider->getConnectionParameters());
64-
}
66+
6567
}
6668

6769
/**

0 commit comments

Comments
 (0)