@@ -220,12 +220,16 @@ public void subscribe(CoreSubscriber<? super Connection> actual) {
220220 if (handler .toURI .isSecure ()) {
221221 if (_config .sslProvider == null ) {
222222 configCopied = true ;
223- _config = new HttpClientConfig (config );
223+ _config = new HttpClientConfig (_config );
224224 _config .sslProvider = HttpClientSecure .defaultSslProvider (_config );
225225 }
226226
227227 if (_config .checkProtocol (HttpClientConfig .h2c )) {
228228 if (_config .protocols .length > 1 ) {
229+ if (!configCopied ) {
230+ configCopied = true ;
231+ _config = new HttpClientConfig (_config );
232+ }
229233 removeIncompatibleProtocol (_config , HttpProtocol .H2C );
230234 }
231235 else {
@@ -240,12 +244,16 @@ public void subscribe(CoreSubscriber<? super Connection> actual) {
240244 else {
241245 if (_config .sslProvider != null ) {
242246 configCopied = true ;
243- _config = new HttpClientConfig (config );
247+ _config = new HttpClientConfig (_config );
244248 _config .sslProvider = null ;
245249 }
246250
247251 if (_config .checkProtocol (HttpClientConfig .h2 )) {
248252 if (_config .protocols .length > 1 ) {
253+ if (!configCopied ) {
254+ configCopied = true ;
255+ _config = new HttpClientConfig (_config );
256+ }
249257 removeIncompatibleProtocol (_config , HttpProtocol .H2 );
250258 }
251259 else {
@@ -266,7 +274,7 @@ else if (_config.checkProtocol(HttpClientConfig.h3)) {
266274 if (proxyProviderSupplier != null ) {
267275 if (!configCopied ) {
268276 configCopied = true ;
269- _config = new HttpClientConfig (config );
277+ _config = new HttpClientConfig (_config );
270278 }
271279 ProxyProvider proxyProvider = proxyProviderSupplier .get ();
272280 _config .proxyProvider (proxyProvider );
0 commit comments