Coder Social home page Coder Social logo

Comments (5)

irvingoujAtDevolution avatar irvingoujAtDevolution commented on July 17, 2024 1

Yes! INFO is preferred on my side, but for the sake of the project, I think WARN might be the better choice. At whichever you prefer

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

This library does not use async, can you please elaborate the details? And what do you mean by the receiver and sender here?

from mdns-sd.

irvingoujAtDevolution avatar irvingoujAtDevolution commented on July 17, 2024

the receiver refers to the flume receiver when browsing a new service

let receiver = service_daemon.browse(service_name.as_ref()).with_context(|| {
            let err_msg = format!("failed to browse for service: {}", service_name);
            error!(error = err_msg);
            err_msg
})?;

The sender of course, refers to the sender on the other side of the channel.

Flume supports async send and with the receiver trait

impl<T> Receiver<T> {
    /// Asynchronously receive a value from the channel, returning an error if all senders have been
    /// dropped. If the channel is empty, the returned future will yield to the async runtime.
    pub fn recv_async(&self) -> RecvFut<'_, T> { <<-------------- This is returns a future
        RecvFut::new(OwnedOrRef::Ref(self))
    }

   //....
}

and commonly, one may want to use tokio timeout for a maximum wait time. if timed out, we usually stop browsing, and the sender will fail to send an event as the tokio timeout drops the future after timed out.

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

I see. The error refers to this one, right?

I assume that in your code it is not easy, or doesn't make much sense to read SearchStopped event, right? As you already are in the process of drop after a time out.

As this is not critical error, we could reduce the logging level of this one to WARN or INFO. Is WARN okay or no?

from mdns-sd.

keepsimple1 avatar keepsimple1 commented on July 17, 2024

Fix merged. Let me know if any problems.

from mdns-sd.

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.