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

Return "last known" server status (at least for backends that are currently unreachable but which have "wake-up" available) #36

Open
vorburger opened this issue Dec 28, 2021 · 0 comments

Comments

@vorburger
Copy link
Contributor

With the introduction of #29 for #21, a possible future enhancement on that front, for anyone interested in contributing here, is this:

Now that mc-router can "wake up" back-ends, the "status" in the Minecraft client, where one can see the Minecraft version and MOTD and Player Count and Server Icon and what not, obviously still just shows "Can't connect to server" for backends that are not yet running, but which one CAN actually connect to (upon which they are woken up by increasing the replicas from 0 to 1, as per that feature).

In a perfect ideal world, it would be cool if we would e.g. "remember" (cache) the "last known" status response - and return that instead of the "Can't connect to server".

This is likely a bit of (fun, interesting) work, because mc-router currently just "pipes through" connections - it doesn't actually know about the Minecraft protocol with status responses and such. (#3 has some WIP work about inspecting frames for commands; this is somewhat related to that.) https://github.com/haveachin/infrared#response-status does this kind of thing, so it seems like it's doable in principle. (But I don't like how there you have to specify that status response in a separate configuration; it seems to me that it would be much nicer if we simply "cached" it from the real back-end.)

I'm unlikely going to work on this myself in the near term, but thought opening an issue about it anyway could perhaps motivate someone else reading along to dig into this.

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

1 participant