mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	健康检查测试过程中不重用连接
This commit is contained in:
		@@ -272,6 +272,7 @@ func (this *HealthCheckExecutor) runNodeOnce(healthCheckConfig *serverconfigs.He
 | 
				
			|||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						req.Close = true
 | 
				
			||||||
	if len(healthCheckConfig.UserAgent) > 0 {
 | 
						if len(healthCheckConfig.UserAgent) > 0 {
 | 
				
			||||||
		req.Header.Set("User-Agent", healthCheckConfig.UserAgent)
 | 
							req.Header.Set("User-Agent", healthCheckConfig.UserAgent)
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
@@ -302,9 +303,9 @@ func (this *HealthCheckExecutor) runNodeOnce(healthCheckConfig *serverconfigs.He
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
				return net.DialTimeout(network, configutils.QuoteIP(result.NodeAddr)+":"+port, timeout)
 | 
									return net.DialTimeout(network, configutils.QuoteIP(result.NodeAddr)+":"+port, timeout)
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			MaxIdleConns:          1,
 | 
								MaxIdleConns:          3,
 | 
				
			||||||
			MaxIdleConnsPerHost:   1,
 | 
								MaxIdleConnsPerHost:   3,
 | 
				
			||||||
			MaxConnsPerHost:       1,
 | 
								MaxConnsPerHost:       3,
 | 
				
			||||||
			IdleConnTimeout:       10 * time.Second,
 | 
								IdleConnTimeout:       10 * time.Second,
 | 
				
			||||||
			ExpectContinueTimeout: 1 * time.Second,
 | 
								ExpectContinueTimeout: 1 * time.Second,
 | 
				
			||||||
			TLSHandshakeTimeout:   0,
 | 
								TLSHandshakeTimeout:   0,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user