Giter Site home page Giter Site logo

Comments (4)

KrishnaPG avatar KrishnaPG commented on July 28, 2024 1

On the surface it seems to @willclarktech . Closing this for now.

from iov-core.

webmaster128 avatar webmaster128 commented on July 28, 2024

Welcome @KrishnaPG and thanks for raising this issue. Which version of @iov/tendermint-rpc are you using? We are already working on reconnecting websocket connections automatically, which turns out to be quite hard.

In #1093 we added a reconnecting websocket that should in theory re-connect every time the connection drops. However, this does not re-subscribe to subscriptions.

If you could describe in more details what you try to do (preferribly with caller code) and what exactly does not work, we can try to understand the specific problem better.

from iov-core.

KrishnaPG avatar KrishnaPG commented on July 28, 2024

Thank you @webmaster128

The version of @iov/tendermint-rpc used for this is: 1.2.0 (from npm)

I just put some debug breakpoints inside VS to step over the code and verify how to send the parameters correctly to the broadcastTxSync. The usage in this case was simple, something like below:

const { Client: TMintRPC } = require('@iov/tendermint-rpc');
this.tMintRPCClient = await TMintRPC.connect("ws://127.0.0.1:26657);

proposeBlock(data) {
    return this.tMintRPCClient.broadcastTxSync({ tx: data });
}

This works fine with http, but with ws even few seconds delay in stepping through the code just disconnects and does not reconnect afterwards for next call (even breakpoints are disabled for the next calls).

The culprit is in my opioin, the server side (tendermint node) is disconnecting the client and for some reason client is not able to detect it (which is evident by the fact that client is able to make the request, but server is unable to reply back). The server is what is throwing the error, not the RPCClient.

But if the RPC Client could detect the disconnection show how, (may be ping-pong?) and reestablish it, it may resolve it.

from iov-core.

willclarktech avatar willclarktech commented on July 28, 2024

Thanks @KrishnaPG, would your issue be solved if #1200 was successfully closed?

from iov-core.

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.