mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Fix bug in polling-interval-ms
This commit is contained in:
@@ -172,7 +172,6 @@ func (c *Client) Run(ctx context.Context) error {
|
||||
case <-ctx.Done():
|
||||
return nil
|
||||
case <-pollChan:
|
||||
fmt.Println("poll")
|
||||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user