mirror of https://github.com/F-Stack/f-stack.git
Nginx: bugfix, shouldnot pollute `socket type`
This commit is contained in:
parent
302113aba2
commit
f2602fcff6
|
@ -44,12 +44,13 @@ ngx_event_connect_peer(ngx_peer_connection_t *pc)
|
||||||
to explicitly call the needed socket() function.
|
to explicitly call the needed socket() function.
|
||||||
*/
|
*/
|
||||||
if (!pc->belong_to_host) {
|
if (!pc->belong_to_host) {
|
||||||
type |= SOCK_FSTACK;
|
s = ngx_socket(pc->sockaddr->sa_family, type | SOCK_FSTACK, 0);
|
||||||
|
} else {
|
||||||
|
s = ngx_socket(pc->sockaddr->sa_family, type, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
s = ngx_socket(pc->sockaddr->sa_family, type, 0);
|
s = ngx_socket(pc->sockaddr->sa_family, type, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pc->log, 0, "%s socket %d",
|
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pc->log, 0, "%s socket %d",
|
||||||
(type == SOCK_STREAM) ? "stream" : "dgram", s);
|
(type == SOCK_STREAM) ? "stream" : "dgram", s);
|
||||||
|
|
Loading…
Reference in New Issue