mirror of
https://github.com/nginx/nginx.git
synced 2024-11-27 23:49:00 +08:00
merge r2975:
handle Win32 ReadFile() EOF state in Unix way
This commit is contained in:
parent
bfb2447d15
commit
0ac11cd241
@ -95,7 +95,13 @@ ngx_read_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
|
||||
}
|
||||
|
||||
if (ReadFile(file->fd, buf, size, &n, povlp) == 0) {
|
||||
ngx_log_error(NGX_LOG_ERR, file->log, ngx_errno, "ReadFile() failed");
|
||||
err = ngx_errno;
|
||||
|
||||
if (err == ERROR_HANDLE_EOF) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ERR, file->log, err, "ReadFile() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user