Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetMessageType.Discovery unhandled when connected #119

Open
Skyppid opened this issue Feb 25, 2019 · 2 comments
Open

NetMessageType.Discovery unhandled when connected #119

Skyppid opened this issue Feb 25, 2019 · 2 comments

Comments

@Skyppid
Copy link

Skyppid commented Feb 25, 2019

I am currently using the Discovery feature in order to find new "components" in the network (a component being any kind of app which supports the protocol and may interact with other components) and to update existing ones' information (name and some other meta data) regularly.

I see that discovery doesn't work for connected instances. As long as there is no active connection, I get and handle request and response, but once connected I don't get those messages anymore. So far so good, I can handle this otherwise.

But is this intentional, that I receive a warning whenever a request comes in? This floods my log and I kinda don't see the point of it. Even if connected and even if the connected party requests a discovery, why wouldn't I be able to handle it? I could still drop it, but this just looks like some kind of bug or "Not yet implemented" thing.

Is it? Because then I'd try to fix that and do a PR.

@JimmyCushnie
Copy link

I think this is intentional behavior. Discovery is for discovering peers, not for learning about peers you already know exist.

For your usage case I think you should probably have two NetPeers: one for discovering, one for connecting.

@Skyppid
Copy link
Author

Skyppid commented Jan 27, 2021

Maybe yeah. I worked around that by sending custom messages identical to my discoveries in a fixed time interval. Not so sure about the scenario anymore though since this was two years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants