Skip to content

ioutil.ReadAll never finishes downloading a file with disabled concurency #489

@glebteterin

Description

@glebteterin

I'm connecting to a server with sftp.UseConcurrentReads(false), then open a file with Client.Open and read it to memory with ioutil.ReadAll. Due to the readAtSequential function (client.go) suppressing io.EOF error, the ioutil.ReadAll can't know when the file is fully read and won't finish.

I'm not sure I understand the reasoning for File.Read() doesn't return io.EOF, it seems like a bug introduced during refactoring. If so, would you accept a PR that fixes it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions