mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
update example, add realtime option, fix ip limit bug for packet protocol
This commit is contained in:
@@ -58,6 +58,7 @@ func (p *Conf) Watch(filePath string, reload func()) error {
|
||||
case event := <-watcher.Events:
|
||||
if event.Has(fsnotify.Write) {
|
||||
log.Println("config dir changed, reloading...")
|
||||
*p = *New()
|
||||
err := p.LoadFromPath(filePath)
|
||||
if err != nil {
|
||||
log.Printf("reload config error: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user