Fixed the GitHub Actions build failure in src/ngx_http_monitoring_collectors.c.
This commit is contained in:
@@ -395,7 +395,10 @@ ngx_http_monitoring_collect_tcp(ngx_http_monitoring_shctx_t *sh)
|
||||
continue;
|
||||
}
|
||||
|
||||
(void) fgets(line, sizeof(line), fp);
|
||||
if (fgets(line, sizeof(line), fp) == NULL) {
|
||||
fclose(fp);
|
||||
continue;
|
||||
}
|
||||
|
||||
while (fgets(line, sizeof(line), fp) != NULL) {
|
||||
state = 0;
|
||||
|
||||
Reference in New Issue
Block a user