download file: Fix bug

abnormal while download large file(> 1MB) on low frequency device

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
Jianhui Zhao
2020-02-07 15:02:21 +08:00
parent 5706c4bc29
commit 347ef19d9e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -348,10 +348,10 @@ static void on_net_read(struct ev_loop *loop, struct ev_io *w, int revents)
#if RTTY_SSL_SUPPORT
if (rtty->ssl)
ret = buffer_put_fd_ex(&rtty->rb, w->fd, -1, &eof, rtty_ssl_read, rtty->ssl);
ret = buffer_put_fd_ex(&rtty->rb, w->fd, 4096, &eof, rtty_ssl_read, rtty->ssl);
else
#endif
ret = buffer_put_fd(&rtty->rb, w->fd, -1, &eof);
ret = buffer_put_fd(&rtty->rb, w->fd, 4096, &eof);
if (ret < 0) {
log_err("socket read error: %s\n", strerror (errno));
return;