ticker leak
This commit is contained in:
parent
98542afd24
commit
41683155e0
2
main.go
2
main.go
@ -151,8 +151,8 @@ func (watch *Watch) server() http.Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (watch *Watch) run(ctx context.Context) error {
|
func (watch *Watch) run(ctx context.Context) error {
|
||||||
for {
|
|
||||||
ticker := time.NewTicker(5 * time.Second)
|
ticker := time.NewTicker(5 * time.Second)
|
||||||
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
for i, v := range watch.Tildes {
|
for i, v := range watch.Tildes {
|
||||||
|
Loading…
Reference in New Issue
Block a user