Giter Site home page Giter Site logo

Comments (3)

sdroege avatar sdroege commented on May 8, 2024

Can you provide a testcase to reproduce it?

from async-tungstenite.

Texlo-Dev avatar Texlo-Dev commented on May 8, 2024

My repository is https://github.com/spec-tacles/rustacles

To test it for yourself, you can run DISCORD_TOKEN=NTM1NTc5NTY1NDg2MTEyNzk2.XpB0Kw.TTFFbeGR7Jen7G_vkJCyPzEHBVA SHARD_COUNT=2 RUST_LOG=debug cargo run --example sharder

I'll reset the token once you've tested it.

from async-tungstenite.

sdroege avatar sdroege commented on May 8, 2024

What fails here is this line

let try_socket = TcpStream::connect((domain.as_str(), port)).await;

It's trying to connect to gateway.discord.gg:443 and tokio just returns that error to us before we can even start the TLS (let alone the WebSocket) handshake. You should be able to reproduce the same with just doing exactly the same from your application code, e.g. directly calling tokio::net::TcpStream::connect(("gateway.discord.gg", 443)).await.unwrap() in Shard::connect().

This seems to be a general problem in how your application uses tokio. This error would happen if the tokio Task you're running in was somehow cancelled.

from async-tungstenite.

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.