air
air copied to clipboard
Fatal error handling
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?
This should be added as a air.toml setting option.