2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-01 19:23:24 +00:00

fix: stop interval if error occurs

This commit is contained in:
TorchedSammy 2021-11-28 09:29:17 -05:00
parent f6aaf85cca
commit 9261253b63
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

4
lua.go
View File

@ -201,8 +201,8 @@ func hshinterval(L *lua.LState) int {
NRet: 0,
Protect: true,
}); err != nil {
fmt.Fprintln(os.Stderr,
"Error in interval function:\n\n", err)
fmt.Fprintln(os.Stderr, "Error in interval function:\n\n", err)
stop <- lua.LTrue // stop the interval
}
case <-stop:
ticker.Stop()