Skip to content

SshException: Can not skip back in messages #168

Open
@tomasaschan

Description

@tomasaschan

We're seeing a bunch of errors like this one in our production environment, but I can't reproduce it when running locally. Thus, it's pretty difficult to figure out where the faulting code is.

ERROR Renci.SshNet.Common.SshException: Can not skip back in messages.
   at Renci.SshNet.Sftp.SftpSession.RequestRead(Byte[] handle, UInt64 offset, UInt32 length)
   at Renci.SshNet.Sftp.SftpFileStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at <someone else's code>

Do you have any suggestions on what could cause these exceptions to be thrown?

We do have code like this:

contents.Flush(); // contents is an SftpFileStream
contents.Seek(0, SeekOrigin.Begin);

but that works fine when I'm debugging. Any help with either fixing this problem, or even reproducing it locally, is much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions