mikejdorm / sftp_ex

MIT License
25 stars 23 forks source link

I can create file but can't stream into it #13

Open antonmi opened 6 years ago

antonmi commented 6 years ago

Hi, @mikejdorm ! Thanks for the tool!

I have an issue with one of SFTP server I use. SftpEx.stream! successfully connects to the server and even creates a zero-size file in it. But then it hangs out for a while and fails with the error:

[error] {:error, :closed}
** (FunctionClauseError) no function clause matching in anonymous fn/2 in Collectable.SFTP.Stream.into/3
(sftp_ex) lib/sftp/stream.ex:26: anonymous fn/2 in Collectable.SFTP.Stream.into/3

and

** (MatchError) no match of right hand side value: {:error, :closed}
    (ssh) ssh_sftp.erl:467: :ssh_sftp.write_file/4
    (sftp_ex) lib/sftp/transfer_service.ex:42: SFTP.TransferService.upload/3

SftpEx.upload behaves the same way.

Another SFTP server works perfectly, so I'm not sure if this is an issue with sftp_ex or with server configuration.

Need your helpfull opinion! Thanks.