Coder Social home page Coder Social logo

Tokio panic with Unordered about thirtyfour HOT 8 CLOSED

Tockra avatar Tockra commented on July 21, 2024
Tokio panic with Unordered

from thirtyfour.

Comments (8)

panicbit avatar panicbit commented on July 21, 2024 1

The issue is that the execute future gets polled and then dropped before finishing. This drops the receiver (ret_rx) and makes this send panic as a result.

from thirtyfour.

panicbit avatar panicbit commented on July 21, 2024 1

Yes, ignoring the error is likely the way to go. We tried it for the application in the OP and it seemed to work fine.
Regarding logging, I'd probably go with a Debug loglevel, since this event seems fairly uninteresting outside of this crate.

from thirtyfour.

Tockra avatar Tockra commented on July 21, 2024 1

@stevepryde could you notify me here, when this fix is in the crates.io version of this crate? Until then I will use a local git branch ;)

from thirtyfour.

panicbit avatar panicbit commented on July 21, 2024

Minimal repro:

use thirtyfour::prelude::*;
use tokio::time::*;

#[tokio::main]
async fn main() -> WebDriverResult<()> {
    let caps = DesiredCapabilities::chrome();
    let driver = WebDriver::new("http://localhost:9515/", &caps).await?;

    let fut = driver.get("http://example.org");
    let _ = timeout(Duration::from_millis(1), fut).await;

    Ok(())
}

from thirtyfour.

stevepryde avatar stevepryde commented on July 21, 2024

Ok that makes sense. So I assume in this case it should probably just ignore the send error? Perhaps we can log it as a warning and then continue.

from thirtyfour.

stevepryde avatar stevepryde commented on July 21, 2024

Good point 👍

from thirtyfour.

Tockra avatar Tockra commented on July 21, 2024

I had a little bit panic, but as panicbit says after removing the expect, my application works again.

from thirtyfour.

stevepryde avatar stevepryde commented on July 21, 2024

@Tockra I've uploaded a fix in v0.23.1 which should be on crates.io now. Let me know if this fixes the issue.

from thirtyfour.

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.