Git Product home page Git Product logo

Comments (4)

erossignon avatar erossignon commented on June 11, 2024 1

@ePluvinage the current behavior is that the client.isReconnecting flag goes back to true straight after the "connection_reestablished" event is raised.
Let's change the behavior as you suggested as it make more sense that isReconnecting=true at the time the connection_reestablished event is raised.

from node-opcua.

erossignon avatar erossignon commented on June 11, 2024

connection_reestablished only signifies that the secure channel has been re-established. However, the session may still need to be restored at this stage. There is much more to do to reestablish a session, rebuild the subscription, and reinstate the monitored items; only then is the reconnection process completed.

It would be best if you listened to the events emitted by the session

  // session_restored is raised when the session and related subscription
  // have been fully repaired after a reconnection.
  session.on("session_restored", ()=>{});

from node-opcua.

ePluvinage avatar ePluvinage commented on June 11, 2024

Thanks a lot for you answer.
I had tried that as well and it doesn't solve the issue since:

  • Session_restored event is fired before Connection_reestablished
  • When session_restored is fired, both session.isReconnecting and client.isReconnecting are still true.

Please see the code and screen shot below :

      opcuaSession.on("session_restored", () => {
        this.logger.error('Session restored')
        this.logger.error(opcuaClient.isReconnecting)
        this.logger.error(opcuaSession.isReconnecting)
      })

image

from node-opcua.

erossignon avatar erossignon commented on June 11, 2024

fixed in [email protected]

from node-opcua.

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.