From 347ef19d9eaa144e04e24a651aa8574f2c1cc2c0 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 7 Feb 2020 15:02:21 +0800 Subject: [PATCH] download file: Fix bug abnormal while download large file(> 1MB) on low frequency device Signed-off-by: Jianhui Zhao --- src/buffer | 2 +- src/rtty.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/buffer b/src/buffer index f89f64d..99adb71 160000 --- a/src/buffer +++ b/src/buffer @@ -1 +1 @@ -Subproject commit f89f64d0a194136721ad2b4bf1811fe48533cdf5 +Subproject commit 99adb71b0bd8cb2c09fd41e52334a9bcf8831327 diff --git a/src/rtty.c b/src/rtty.c index 0a8ac9b..1c79c53 100644 --- a/src/rtty.c +++ b/src/rtty.c @@ -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;