File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class DohExecutor implements ExecutorInterface {
56
56
* @param string $method
57
57
* @param ?LoopInterface $loop
58
58
*/
59
- public function __construct (string $ nameserver , string $ method = self ::METHOD_GET , LoopInterface $ loop = null )
59
+ public function __construct (string $ nameserver , string $ method = self ::METHOD_GET , ? LoopInterface $ loop = null )
60
60
{
61
61
if (!class_exists ('\React\Http\Browser ' )) {
62
62
throw new RuntimeException ('DNS over HTTPS support requires reactphp/http library ' ); //@codeCoverageIgnore
@@ -150,18 +150,19 @@ private function getBrowser() : Promise\PromiseInterface {
150
150
if ($ this ->ipv6address && self ::NEED_GH9356_IPV6_WORKAROUND ) {
151
151
$ this ->initialiseIPv6Workaround ($ deferred );
152
152
} else {
153
- $ browser = ( new Browser (new Connector ([
153
+ $ browser = new Browser (new Connector ([
154
154
'tcp ' => [
155
155
'tcp_nodelay ' => true ,
156
156
],
157
157
]
158
- ), $ this ->loop )) ;
158
+ ), $ this ->loop );
159
159
$ deferred ->resolve ($ browser );
160
160
}
161
161
}
162
162
return $ this ->browserResolution ;
163
163
}
164
164
165
+ /** @codeCoverageIgnore */
165
166
protected function initialiseIPv6Workaround (Deferred $ deferred ) : void {
166
167
// Some versions of PHP do not validate IPv6 addresses contained in the SAN fields of a certificate
167
168
// To support IPv6 we download the certificate on the first connect and manually verify our nameserver IPv6 IP
You can’t perform that action at this time.
0 commit comments