Coder Social home page Coder Social logo

Connection handling issue about lightning-kmp HOT 3 CLOSED

t-bast avatar t-bast commented on June 23, 2024
Connection handling issue

from lightning-kmp.

Comments (3)

romainbsl avatar romainbsl commented on June 23, 2024 1

I really thought that we weren't processing old LN messages when (re)starting the Peer with a fresh connection.
I think we all agree that we need the reproduce this in a test case, unit and/or integration, to be sure it will not happen again. Maybe this is where the Peer unit test mechanism will be useful.

I not sure that it that easy to discard some TCP socket message, because we still can receive / process TCP messages before the state machine has processed the Disconnect event. My first thought was to work on the coroutine that handles the TCP workflow, and by cancelling it the TCP should close itself and trigger the Disconnect event.

from lightning-kmp.

t-bast avatar t-bast commented on June 23, 2024

@romainbsl @sstone it looks like an issue in connection management, can you investigate? I'm hoping we can fix the connection layer to avoid being in that case, otherwise we'll have to do some nasty work-arounds to ensure our state stays consistent...

from lightning-kmp.

t-bast avatar t-bast commented on June 23, 2024

Note that a simple solution could be to discard the contents of the tcp socket once the peer considers the connection closed?
In this specific example it means we would discard the last commit_sig, so when doing our channel_reestablish on the new connection we would tell our peer to retransmit it and everything would work.

from lightning-kmp.

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.