Retry of Pring changed to Count
This commit is contained in:
parent
b6d1f49145
commit
e9c4b79b35
|
@ -29,7 +29,7 @@ func TestPing(t *testing.T) {
|
||||||
"00:11:32:7f:20:61",
|
"00:11:32:7f:20:61",
|
||||||
),
|
),
|
||||||
pingOption: &ounp.PingOption{
|
pingOption: &ounp.PingOption{
|
||||||
Retry: 3,
|
Count: 3,
|
||||||
Interval: 1,
|
Interval: 1,
|
||||||
Deadline: 1,
|
Deadline: 1,
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,7 +18,7 @@ func Ping(service *omd.Service, pingOption ounp.Option) (ounp.Result, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
LOOP:
|
LOOP:
|
||||||
for indexR := 0; indexR < pingOption.GetRetry(); indexR++ {
|
for indexR := 0; indexR < pingOption.GetCount(); indexR++ {
|
||||||
conn, err := getConnection(service, pingOption)
|
conn, err := getConnection(service, pingOption)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
pingResult.Responses[indexR] = &ounp.PingResponse{
|
pingResult.Responses[indexR] = &ounp.PingResponse{
|
||||||
|
|
|
@ -42,7 +42,7 @@ func TestPing(t *testing.T) {
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
pingOption: &ounp.PingOption{
|
pingOption: &ounp.PingOption{
|
||||||
Retry: 3,
|
Count: 3,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,7 +37,7 @@ func processPrepacket(service *omd.Service, pingOption ounp.Option, matchCtx *os
|
||||||
buf := make([]byte, 1024)
|
buf := make([]byte, 1024)
|
||||||
|
|
||||||
LOOP:
|
LOOP:
|
||||||
for indexR := 0; indexR < pingOption.GetRetry(); indexR++ {
|
for indexR := 0; indexR < pingOption.GetCount(); indexR++ {
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
matchCtx.InitAttribute()
|
matchCtx.InitAttribute()
|
||||||
conn, err := getConnection(service, pingOption)
|
conn, err := getConnection(service, pingOption)
|
||||||
|
@ -148,7 +148,7 @@ func processPostpacket(service *omd.Service, pingOption ounp.Option, matchCtx *o
|
||||||
buf := make([]byte, 1024)
|
buf := make([]byte, 1024)
|
||||||
|
|
||||||
LOOP:
|
LOOP:
|
||||||
for indexR := 0; indexR < pingOption.GetRetry(); indexR++ {
|
for indexR := 0; indexR < pingOption.GetCount(); indexR++ {
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
matchCtx.InitAttribute()
|
matchCtx.InitAttribute()
|
||||||
packetCount := _matcher.PacketCount(matchCtx)
|
packetCount := _matcher.PacketCount(matchCtx)
|
||||||
|
|
|
@ -43,7 +43,7 @@ func TestPing(t *testing.T) {
|
||||||
"HTTP",
|
"HTTP",
|
||||||
),
|
),
|
||||||
pingOption: &ounp.PingOption{
|
pingOption: &ounp.PingOption{
|
||||||
Retry: 3,
|
Count: 3,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user