Skip to content

Reboot output pauses on telnet client when no activity #401

@iamnove

Description

@iamnove

When rebooting while connected with a telnet client the game output (after "The connection to xxxxx was broken. Please be patient...") doesn't progress until the client sends input. Then the logo etc is displayed normally.

On closer inspection and testing, this relates to the hook's .Wait(nullptr) in reboot sequence which for telnet is waiting with no timeout. Input or another connection cause it to progress so on a real world busy server this isn't too bad. This doesn't look notably different from diku2 but for some reason this behaviour doesn't occur on the older version (even with a single client connected). It would be good to pinpoint why (socket options elsewhere?)

There's plenty of quick fixes such as a polling loop for mud status instead of Wait(), or add a timeout value on Wait() etc. There seems to be some very subtle risks around these options though (like not handling other socket activity, and breaking the logic around response to player input saying MUD is still rebooting etc). Websockets just bypass the Wait() and loop but there might be a better fix that doesn't come with any very subtle unintended consequences for telnet.

(Funny catch-22, not doing wait() is a minor impact on new connections during a reboot, but when doing wait() new connections help make the problem go away)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions