diff options
author | wangrong <wangrong@uniontech.com> | 2023-01-05 12:26:54 +0000 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2023-01-05 12:26:54 +0000 |
commit | 4bef1d3e66096a0b2b88db6d36bd1301fdac8987 (patch) | |
tree | 4230cefbdd289b56bb895eb4d8c45e321b98668d | |
parent | 718eae3d7e6a2c8d39fc0b0459d25ae5fc286ce6 (diff) | |
download | gvfs-4bef1d3e66096a0b2b88db6d36bd1301fdac8987.tar.gz |
ftp: Update ftp->connections when the connection is released
After gvfsd-ftp is connected to the ftp server, if the ftp server
stops, the gvfsd-ftp sending request will be stuck, even after the ftp
server is started, it still cannot be recovered. This is because
ftp->connections is not updated when the connection is released,Thus
let ftp->connections decrement by one when the connection is released.
https://gitlab.gnome.org/GNOME/gvfs/-/merge_requests/149
-rw-r--r-- | daemon/gvfsftptask.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c index 6fba89b1..e44f8069 100644 --- a/daemon/gvfsftptask.c +++ b/daemon/gvfsftptask.c @@ -231,6 +231,7 @@ g_vfs_ftp_task_acquire_connection (GVfsFtpTask *task) if (g_vfs_ftp_connection_is_usable (task->conn)) break; + ftp->connections--; g_vfs_ftp_connection_free (task->conn); task->conn = NULL; } |