File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ name = "debug-client"
77retry = 10
88# the key used in SHA256-HMAC authentication
99key = " keyusedforhmac"
10+ # retry interval
11+ retry-interval = 10
1012
1113# Set corresponding item to false if you don't want to enable some test
1214[api ]
Original file line number Diff line number Diff line change 11package main
22
33type ConfigConn struct {
4- Remote string `toml:"remote"`
5- Name string `toml:"name"`
6- Key string `toml:"key"`
7- Retry uint32 `toml:"retry"`
4+ Remote string `toml:"remote"`
5+ Name string `toml:"name"`
6+ Key string `toml:"key"`
7+ Retry uint32 `toml:"retry"`
8+ Interval uint64 `toml:"retry-interval"`
89}
910
1011type ConfigAPI struct {
@@ -24,6 +25,7 @@ func (r *Config) SetDefault() {
2425 r .Conn .Remote = "ws://127.0.0.1:8080"
2526 r .Conn .Name = "debug-client"
2627 r .Conn .Retry = 10
28+ r .Conn .Interval = 10
2729
2830 r .API .Resolve = true
2931 r .API .Ping = true
Original file line number Diff line number Diff line change @@ -327,7 +327,6 @@ func main() {
327327 }
328328 icmp .GetICMPManager ().Flush ()
329329
330- time .Sleep (time .Second )
330+ time .Sleep (time .Duration ( config . Conn . Interval ) * time . Second )
331331 }
332-
333332}
You can’t perform that action at this time.
0 commit comments