summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Nilsson <hans@erlang.org>2020-02-26 17:45:20 +0100
committerHans Nilsson <hans@erlang.org>2020-02-26 17:48:57 +0100
commit6ac7eb422524ac8f6659a53975600c24304d5c06 (patch)
treebd10ec01edaf8fe9e2466a5004aa5a6e443b9416
parent6a99831ae3c5c7962929108480323792af6cbc61 (diff)
downloaderlang-6ac7eb422524ac8f6659a53975600c24304d5c06.tar.gz
ssh: Add timeout to sftp channel kill sequence
to avoid hanging.
-rw-r--r--lib/ssh/src/ssh_sftp.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl
index 79586141b2..693d638275 100644
--- a/lib/ssh/src/ssh_sftp.erl
+++ b/lib/ssh/src/ssh_sftp.erl
@@ -180,6 +180,8 @@ stop_channel(Pid) ->
receive
{'EXIT', Pid, killed} ->
ok
+ after 5000 ->
+ ok
end
end,
process_flag(trap_exit, OldValue),