mirror of
https://github.com/zhaojh329/rtty.git
synced 2026-02-27 09:53:17 +08:00
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:
+1
-1
Submodule src/buffer updated: f89f64d0a1...99adb71b0b
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user