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

Fatal error handling #116

Open
xpufx opened this issue Oct 14, 2020 · 1 comment
Open

Fatal error handling #116

xpufx opened this issue Oct 14, 2020 · 1 comment

Comments

@xpufx
Copy link

xpufx commented Oct 14, 2020

I am running air on Linux with 'go run'. Everything is working fine. Thanks for that first of all. It was impressive. I didn't even create a config, just typed 'air' and it works. Very cool.

Here's what just happened. I have air running in an ssh terminal to which my network lost connection. An instance of air is still running - meaning my go app which blocks a port is still running. The program checks for this error and prints it into stderr and is supposed to die. (log.Fatal()) . However air doesn't exit. The program it's watching is not running anymore at this point (but the old version is).

I understand the idea and I like it. I fix the code and save and it would re-run. This is why Fatal is not killing air. However in this situation, since the port is blocked, this can't be fixed in code. The old air process (and the running go process through it) must be killed.

Is there anything in place to handle these kinds of situations?

@jasonbronson
Copy link

This should be added as a air.toml setting option.

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