refactor: reconsider http read header timeouts
This commit is contained in:
		
					parent
					
						
							
								5c5df68065
							
						
					
				
			
			
				commit
				
					
						8081eb9f92
					
				
			
		
					 4 changed files with 22 additions and 7 deletions
				
			
		|  | @ -29,8 +29,14 @@ pub(crate) fn connection_builder(globals: &Arc<Globals>) -> Arc<ConnectionBuilde | |||
|     .pipeline_flush(true); | ||||
|   http_server | ||||
|     .http2() | ||||
|     .keep_alive_interval(Some(globals.proxy_config.proxy_idle_timeout)) | ||||
|     .timer(TokioTimer) | ||||
|     .max_concurrent_streams(globals.proxy_config.max_concurrent_streams); | ||||
| 
 | ||||
|   if globals.proxy_config.keepalive { | ||||
|     http_server | ||||
|       .http2() | ||||
|       .keep_alive_interval(Some(globals.proxy_config.proxy_idle_timeout)) | ||||
|       .keep_alive_timeout(globals.proxy_config.proxy_idle_timeout + std::time::Duration::from_secs(1)) | ||||
|       .timer(TokioTimer); | ||||
|   } | ||||
|   Arc::new(http_server) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jun Kurihara
				Jun Kurihara