Skip to content

Commit f2ee101

Browse files
committed
ssh: Close leaked SFTP connection in ssh_algorithms_SUITE
simple_sftp/1 did not close the connection returned by std_simple_sftp/4. With the shared daemon introduced in 876eba0, leaked connections accumulated over the full suite run (~244 sockets), exhausting file descriptors on NetBSD and causing emfile errors in subsequent test cases.
1 parent 57b91b0 commit f2ee101

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/ssh/test/ssh_algorithms_SUITE.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ simple_sftp(Config) ->
301301
{kex,_} -> [{preferred_algorithms,AlgEntries}];
302302
_ -> [{modify_algorithms,[{append,AlgEntries}]}]
303303
end,
304-
ssh_test_lib:std_simple_sftp(Host, Port, Config, Opts).
304+
{true, ConnectionRef} = ssh_test_lib:std_simple_sftp(Host, Port, Config, Opts),
305+
ssh:close(ConnectionRef).
305306

306307
%%--------------------------------------------------------------------
307308
%% A simple exec call

0 commit comments

Comments
 (0)