mirror of https://github.com/F-Stack/f-stack.git
Nginx : The I/O functions with glue code may be called before ngx_max_sockets is initialized, fix this error.
This commit is contained in:
parent
df18ef7de7
commit
2b31b4e34c
|
@ -152,6 +152,10 @@ static inline int restore_fstack_fd(int sockfd) {
|
||||||
|
|
||||||
/* Tell whether a 'sockfd' belongs to fstack. */
|
/* Tell whether a 'sockfd' belongs to fstack. */
|
||||||
static inline int is_fstack_fd(int sockfd) {
|
static inline int is_fstack_fd(int sockfd) {
|
||||||
|
if (unlikely(inited == 0)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return sockfd >= ngx_max_sockets;
|
return sockfd >= ngx_max_sockets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue