@@ -365,28 +365,36 @@ def new_host(
365365 effective_connection_config = quic_transport_opt
366366
367367 # If both connection_config and quic_transport_opt are provided,
368- # merge health monitoring settings
368+ # merge ALL connection and health monitoring settings
369369 if connection_config is not None :
370- # Merge health monitoring settings from connection_config
371- # into quic_transport_opt
372- if hasattr (connection_config , "enable_health_monitoring" ):
373- quic_transport_opt .enable_health_monitoring = (
374- connection_config .enable_health_monitoring
375- )
376- if hasattr (connection_config , "health_check_interval" ):
377- quic_transport_opt .health_check_interval = (
378- connection_config .health_check_interval
379- )
380- if hasattr (connection_config , "load_balancing_strategy" ):
381- quic_transport_opt .load_balancing_strategy = (
382- connection_config .load_balancing_strategy
383- )
384- if hasattr (connection_config , "max_connections_per_peer" ):
385- quic_transport_opt .max_connections_per_peer = (
386- connection_config .max_connections_per_peer
387- )
370+ # Merge all ConnectionConfig attributes from connection_config
371+ # into quic_transport_opt (which inherits from ConnectionConfig)
372+ connection_config_attrs = [
373+ "max_connections_per_peer" ,
374+ "connection_timeout" ,
375+ "load_balancing_strategy" ,
376+ "enable_health_monitoring" ,
377+ "health_initial_delay" ,
378+ "health_warmup_window" ,
379+ "health_check_interval" ,
380+ "ping_timeout" ,
381+ "min_health_threshold" ,
382+ "min_connections_per_peer" ,
383+ "latency_weight" ,
384+ "success_rate_weight" ,
385+ "stability_weight" ,
386+ "max_ping_latency" ,
387+ "min_ping_success_rate" ,
388+ "max_failed_streams" ,
389+ "unhealthy_grace_period" ,
390+ ]
391+
392+ for attr in connection_config_attrs :
393+ if hasattr (connection_config , attr ):
394+ setattr (quic_transport_opt , attr , getattr (connection_config , attr ))
395+
388396 logger .info (
389- "Merged health monitoring settings from "
397+ "Merged all connection and health monitoring settings from "
390398 "connection_config into QUIC config"
391399 )
392400 elif connection_config is not None :
0 commit comments