@@ -91,7 +91,7 @@ func main() {
9191 httpAddrNew = fs .String ("addr" , "localhost:8080" , "HTTP server address (for 'gabs server http' command)" )
9292 configDir = fs .String ("configDir" , "" , "Override GABS config directory" )
9393 logLevel = fs .String ("log-level" , "info" , "Log level: trace|debug|info|warn|error" )
94- backoff = fs .String ("reconnectBackoff" , defaultBackoff , "Reconnect backoff window, e.g. '100ms..5s '" )
94+ backoff = fs .String ("reconnectBackoff" , defaultBackoff , "Reconnect backoff window, e.g. '100ms..1s '" )
9595 grace = fs .Duration ("grace" , 3 * time .Second , "Graceful stop timeout before kill" )
9696 )
9797
@@ -658,23 +658,23 @@ func resolveMacOSAppBundle(appPath string) (string, error) {
658658
659659func parseBackoff (s string ) (time.Duration , time.Duration , error ) {
660660 // Parse "<min>..<max>" format
661- // Examples: "100ms..5s ", "1s..30s", "250ms..inf"
661+ // Examples: "100ms..1s ", "1s..30s", "250ms..inf"
662662 switch {
663663 case s == "" , s == defaultBackoff :
664- return 100 * time .Millisecond , 5 * time .Second , nil
664+ return 100 * time .Millisecond , 1 * time .Second , nil
665665 default :
666666 // Split on ".."
667667 parts := strings .Split (s , ".." )
668668 if len (parts ) != 2 {
669- return 100 * time .Millisecond , 5 * time .Second , fmt .Errorf ("invalid format, expected 'min..max'" )
669+ return 100 * time .Millisecond , 1 * time .Second , fmt .Errorf ("invalid format, expected 'min..max'" )
670670 }
671671
672672 min , err := time .ParseDuration (parts [0 ])
673673 if err != nil {
674- return 100 * time .Millisecond , 5 * time .Second , fmt .Errorf ("invalid min duration: %w" , err )
674+ return 100 * time .Millisecond , 1 * time .Second , fmt .Errorf ("invalid min duration: %w" , err )
675675 }
676676 if min < 0 {
677- return 100 * time .Millisecond , 5 * time .Second , fmt .Errorf ("min duration cannot be negative" )
677+ return 100 * time .Millisecond , 1 * time .Second , fmt .Errorf ("min duration cannot be negative" )
678678 }
679679
680680 var max time.Duration
@@ -683,15 +683,15 @@ func parseBackoff(s string) (time.Duration, time.Duration, error) {
683683 } else {
684684 max , err = time .ParseDuration (parts [1 ])
685685 if err != nil {
686- return 100 * time .Millisecond , 5 * time .Second , fmt .Errorf ("invalid max duration: %w" , err )
686+ return 100 * time .Millisecond , 1 * time .Second , fmt .Errorf ("invalid max duration: %w" , err )
687687 }
688688 if max < 0 {
689- return 100 * time .Millisecond , 5 * time .Second , fmt .Errorf ("max duration cannot be negative" )
689+ return 100 * time .Millisecond , 1 * time .Second , fmt .Errorf ("max duration cannot be negative" )
690690 }
691691 }
692692
693693 if min > max {
694- return 100 * time .Millisecond , 5 * time .Second , fmt .Errorf ("min duration (%v) cannot be greater than max duration (%v)" , min , max )
694+ return 100 * time .Millisecond , 1 * time .Second , fmt .Errorf ("min duration (%v) cannot be greater than max duration (%v)" , min , max )
695695 }
696696
697697 return min , max , nil
0 commit comments