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

watch: properly reset terminal after idle timeout #163

Merged
merged 1 commit into from
Nov 21, 2020

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Nov 21, 2020

Fixes a bug from #160

Previous the terminal would not be reset because the defer was in the
redo handler goroutine. This goroutine accepts a context, but because it
blocks on reading from stdin, it does not exit when the context is
cancelled.

To fix the problem, the defer is moved into the main goroutine.

@dnephin dnephin added the bug Something isn't working label Nov 21, 2020
Previous the terminal would not be reset because the defer was in the
redo handler goroutine. This goroutine accepts a context, but because it
blocks on reading from stdin, it does not exit when the context is
cancelled.

To fix the problem, the defer is moved into the main goroutine.
@dnephin dnephin merged commit 76b46f9 into gotestyourself:main Nov 21, 2020
@dnephin dnephin deleted the reset-term-on-idle-timeout branch November 21, 2020 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant