Giter VIP home page Giter VIP logo

Comments (4)

Lukasa avatar Lukasa commented on September 17, 2024 1

Ok great, this crash report is sufficient. I think the issue here is that we don't change that self.state.sentClose is false before we send the window update. That would likely fix the issue here. It shouldn't be too hard to construct a unit test that triggers this.

from swift-nio-ssh.

Lukasa avatar Lukasa commented on September 17, 2024

Hmm, I'm not observing this crash locally. Can you attach a full backtrace, or even better a crash report?

from swift-nio-ssh.

gaetanzanella avatar gaetanzanella commented on September 17, 2024

NIOSSHClient-2023-04-17-164811.ips.zip

You can try to reduce the time before closing:

DispatchQueue.global(qos: .default).asyncAfter(deadline: .now() + 0.5) {
    print("")
    _ = childChannel.close(promise: nil)
}

I propose a new version (I think the print was creating some delay).

from swift-nio-ssh.

gaetanzanella avatar gaetanzanella commented on September 17, 2024

I tried a fix. I am not super sure about it:

  • Triggering the right action after an event, based on the current state, seems to be the responsibility of the state machine rather the SSHChildChannel directly. Should the action be propagated to the state machine and handled by it?
  • As the window seems to be used from one message reception to the other, if the server keeps sending messages while the client is closed and does not trigger the appropriate window update, could it lead to unpredictable behaviors? I am not a ssh expert.

Let me know. Thanks for your time!

from swift-nio-ssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.