elsaland / elsa

❄️ Elsa is a minimal runtime for JavaScript and TypeScript written in Go
MIT License
2.79k stars 61 forks source link

Ineffectual sync.WaitGroup in ops.Serve #77

Closed samhza closed 3 years ago

samhza commented 3 years ago

https://github.com/elsaland/elsa/blob/0819922b24f01849de855ff2852f2f28631fc1cb/core/ops/serve.go#L66 This call to wg.Wait is unreachable because the for loop preceding it never breaks. As a fix, a chan error should be used instead of a sync.WaitGroup so the error from http.ListenAndServe can be returned as well (see #75.)

littledivy commented 3 years ago

Fixed in #78. Can we close this @samhza?