File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 112112
113113COMPANION_POOL  =  Invidious ::ConnectionPool ::Pool .new(
114114  max_capacity:  CONFIG .pool_size,
115+   reinitialize_proxy:  false 
115116) do 
116117  companion =  CONFIG .invidious_companion.sample
117118  next  make_client(companion.private_url, use_http_proxy:  false )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ module Invidious::ConnectionPool
88      * ,
99      max_capacity : Int32  =  5 ,
1010      timeout : Float64  =  5.0 ,
11+       @reinitialize_proxy  : Bool  =  true , #  Whether or not http-proxy should be reinitialized on checkout
1112      & client_factory : - >  HTTP ::Client 
1213    )
1314      pool_options =  DB ::Pool ::Options .new(
@@ -57,7 +58,7 @@ module Invidious::ConnectionPool
5758      #  This new TCP IO will be a direct connection to the server and will not go
5859      #  through the proxy. As such we'll need to reinitialize the proxy connection
5960
60-       http_client.proxy =  make_configured_http_proxy_client() if  CONFIG .http_proxy
61+       http_client.proxy =  make_configured_http_proxy_client() if  @reinitialize_proxy   &&   CONFIG .http_proxy
6162
6263      response =  yield  http_client
6364    rescue  ex : DB ::PoolTimeout 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments