air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.53k stars 779 forks source link

Crashes on Windows 10 after second reload #431

Open kiridcode opened 1 year ago

kiridcode commented 1 year ago

Hi,

I have the problem that after the second reload air crashes with the error of fatal: morestack on g0. The process is running twice:

running...
Starting the server on :3000...
running...
Starting the server on :3000...

Anyone having the same issue? I have searched for the error message but couldn't find anything.

Thanks!

Edit:

Adding a delay of 10 to my .air.toml file worked so far.

[build]
  delay = 10

And I have to deactivate Windows Firewall to get it to work. It doesn't work when I save my file fast and twice, then it seems like it is starting my server twice which will lead to a crash and the error message from above.

The best thing would be to cancel the old building of the code and only execute it once.

thebasedbob commented 10 months ago

I didn't have an issue with Windows Firewall but can confirm that the issue of 2 builds happening at once after 2nd reload. It happens without delay being set to 10, setting to 10 seems to have fixed the issue though.

From what I saw in the terminal output looks like the watching seems to double after the 1st reload and without the delay = 10 triggers 2 build jobs back to back