summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
-rw-r--r--src/ssh.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 738b346..055cbad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -487,12 +487,8 @@ out:
void mscp_copy_thread_cleanup(void *arg)
{
struct mscp_thread *t = arg;
- if (t->sftp) {
- /* XXX: sftp_free --> ssh_poll sometimes blocked with
- * no responses. So wet nonblocking. */
- ssh_set_blocking(sftp_ssh(t->sftp), 1);
+ if (t->sftp)
ssh_sftp_close(t->sftp);
- }
t->finished = true;
__sync_synchronize();
}
diff --git a/src/ssh.c b/src/ssh.c
index 48e72f4..634901b 100644
--- a/src/ssh.c
+++ b/src/ssh.c
@@ -239,7 +239,10 @@ static int ssh_verify_known_hosts(ssh_session session)
void ssh_sftp_close(sftp_session sftp)
{
ssh_session ssh = sftp_ssh(sftp);
- sftp_free(sftp);
+ /* XXX: sftp_free is stuck in ssh_poll_ctx_dopoll() when build type is Release.
+ * skip sftp_free inappropriately...
+ */
+ //sftp_free(sftp);
ssh_disconnect(ssh);
ssh_free(ssh);
}