You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
通过测试将以下代码去注释即可解决以上问题,但不知道最初对其的注释是出于什么原因,去注释后会不会导致什么问题?
/* (changxun): set sock opt "IP_RECVERR" in order to recv icmp error like host/port unreachable. /
/ note: we have invoke 'ngx_event_connect_peer() above. so the code we comment is not required.
int val = 1;
if( setsockopt( c->fd, SOL_IP, IP_RECVERR, &val, sizeof(val) ) == -1 ){
ngx_log_error(NGX_LOG_ERR, event->log, 0,
"setsockopt(IP_RECVERR) failed with peer: %V ",
&peer->check_peer_addr->name);
}
*/
The text was updated successfully, but these errors were encountered:
对于同网段的UDP服务器(不同网段未测试),若服务器关闭或网络断开,健康检查将认为UDP包正常超时,认为该服务器状态正常可用,在ngx_event_connect_peer() 和ngx_stream_upstream_check_peek_one_byte()中都没有捕获到错误。
通过测试将以下代码去注释即可解决以上问题,但不知道最初对其的注释是出于什么原因,去注释后会不会导致什么问题?
/* (changxun): set sock opt "IP_RECVERR" in order to recv icmp error like host/port unreachable. /
/ note: we have invoke 'ngx_event_connect_peer() above. so the code we comment is not required.
int val = 1;
if( setsockopt( c->fd, SOL_IP, IP_RECVERR, &val, sizeof(val) ) == -1 ){
ngx_log_error(NGX_LOG_ERR, event->log, 0,
"setsockopt(IP_RECVERR) failed with peer: %V ",
&peer->check_peer_addr->name);
}
*/
The text was updated successfully, but these errors were encountered: