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

Fix entrypoint hanging when launcher crashes #3

Merged
merged 2 commits into from
Jan 15, 2022

Conversation

mitchpk
Copy link
Contributor

@mitchpk mitchpk commented Jan 10, 2022

These changes allow the entrypoint to terminate if the Northstar launcher crashes, allowing proper auto-restart functionality with docker-compose. Since sendTerminate(true) is deferred to the end of n.Run(), extra calls within Run() are not required. Also, initialising Xrdb now removes old lock files, which in my case were preventing the docker container from restarting successfully.

@mitchpk
Copy link
Contributor Author

mitchpk commented Jan 10, 2022

Turns out this change brings other issues to light, at the moment I am looking at why the watchdog is not receiving updates for the window title and therefore stopping the server:

watchdog: triggered (watchdog did not receive a title update in time: last tick was 5.000093142s ago); killing server
Error: Failed to run server: watchdog did not receive a title update in time

From what I have experienced, the NorthstarLauncher window title may not update when loading a map which causes the watchdog to believe the server is frozen.

@mitchpk
Copy link
Contributor Author

mitchpk commented Jan 12, 2022

I have increased the watchdog timeout from 5 seconds to 1 minute, which is enough time for the launcher to update its title after loading a new map. Also, the PTY no longer outputs double newlines caused by converting "\r\n" to "\n\n".

Copy link
Owner

@pg9182 pg9182 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@pg9182 pg9182 merged commit c8e1d68 into pg9182:master Jan 15, 2022
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

Successfully merging this pull request may close these issues.

2 participants