Skip to content

Commit 483a49a

Browse files
committed
Only construct Guzzle client if not set by something else
1 parent c54eb76 commit 483a49a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Config.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ public function __construct(array $config = []) {
132132
$c
133133
));
134134
}
135+
136+
// if client hasn't been constructed, construct.
137+
if (null === $this->HttpClient) {
138+
$this->HttpClient = new Client();
139+
}
135140
}
136141

137142
/**
@@ -150,7 +155,6 @@ private static function getDefaultConfig() {
150155
$conf = [
151156
'Address' => '127.0.0.1:8500',
152157
'Scheme' => 'http',
153-
'HttpClient' => new Client(),
154158
];
155159

156160
// parse env vars

0 commit comments

Comments
 (0)