disable HTTP keep-alive
NX seems to freeze after some time when talking to a cache with HTTP keep-alive enabled
This commit is contained in:
		
							parent
							
								
									251fbbb286
								
							
						
					
					
						commit
						a223373fc1
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -28,7 +28,9 @@ async fn main() -> std::io::Result<()> {
 | 
				
			||||||
                .service(handlers::get_cache_item)
 | 
					                .service(handlers::get_cache_item)
 | 
				
			||||||
                .service(handlers::put_cache_item)
 | 
					                .service(handlers::put_cache_item)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    })
 | 
				
			||||||
 | 
					    .keep_alive(None); // disable HTTP keep-alive because it seems to break NX (at least in version 20.8)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for bind_address in config.bind_addresses.unwrap_or(vec!["::0".to_string()]) {
 | 
					    for bind_address in config.bind_addresses.unwrap_or(vec!["::0".to_string()]) {
 | 
				
			||||||
        server = server
 | 
					        server = server
 | 
				
			||||||
            .bind((bind_address.clone(), 8080))
 | 
					            .bind((bind_address.clone(), 8080))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue