mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +02:00
fix:polaris config watch (#3082)
* fix:the high CPU usage issue caused by watching the Polaris config, particularly in situations when config events are closed. * fix:the high CPU usage issue caused by watching the Polaris config, particularly in situations when config events are closed. --------- Co-authored-by: tanzhuo <tanzhuo@dingdandao.com>
This commit is contained in:
parent
cd9ef38d13
commit
6be961078c
@ -1,6 +1,7 @@
|
||||
package polaris
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@ -110,7 +111,7 @@ func (w *ConfigWatcher) Next() ([]*config.KeyValue, error) {
|
||||
}
|
||||
return w.cfg, nil
|
||||
}
|
||||
return w.cfg, nil
|
||||
return nil, context.Canceled
|
||||
}
|
||||
|
||||
func (w *ConfigWatcher) Stop() error {
|
||||
|
Loading…
x
Reference in New Issue
Block a user