Fix bug in polling-interval-ms

This commit is contained in:
Anders Pitman
2022-11-11 12:12:40 -07:00
parent cf4ce028a7
commit 658a8841d7
3 changed files with 2 additions and 3 deletions

View File

@@ -172,7 +172,6 @@ func (c *Client) Run(ctx context.Context) error {
case <-ctx.Done():
return nil
case <-pollChan:
fmt.Println("poll")
// continue
}
}

View File

@@ -112,8 +112,8 @@ func main() {
}
minPollInterval := 100
if *pollInterval < minPollInterval {
fail(fmt.Sprintf("-poll-interval-ms must be at least %d", minPollInterval))
if *pollInterval != 0 && *pollInterval < minPollInterval {
fail(fmt.Sprintf("-poll-interval-ms must be at least %d, or 0 to disable polling", minPollInterval))
}
config := &boringproxy.ClientConfig{

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 913 B