Retry of Pring changed to Count

This commit is contained in:
crusader 2018-09-20 14:57:30 +09:00
parent b6d1f49145
commit e9c4b79b35
5 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@ func TestPing(t *testing.T) {
"00:11:32:7f:20:61",
),
pingOption: &ounp.PingOption{
Retry: 3,
Count: 3,
Interval: 1,
Deadline: 1,
},

View File

@ -18,7 +18,7 @@ func Ping(service *omd.Service, pingOption ounp.Option) (ounp.Result, error) {
}
LOOP:
for indexR := 0; indexR < pingOption.GetRetry(); indexR++ {
for indexR := 0; indexR < pingOption.GetCount(); indexR++ {
conn, err := getConnection(service, pingOption)
if nil != err {
pingResult.Responses[indexR] = &ounp.PingResponse{

View File

@ -42,7 +42,7 @@ func TestPing(t *testing.T) {
"",
),
pingOption: &ounp.PingOption{
Retry: 3,
Count: 3,
},
},
},

View File

@ -37,7 +37,7 @@ func processPrepacket(service *omd.Service, pingOption ounp.Option, matchCtx *os
buf := make([]byte, 1024)
LOOP:
for indexR := 0; indexR < pingOption.GetRetry(); indexR++ {
for indexR := 0; indexR < pingOption.GetCount(); indexR++ {
startTime := time.Now()
matchCtx.InitAttribute()
conn, err := getConnection(service, pingOption)
@ -148,7 +148,7 @@ func processPostpacket(service *omd.Service, pingOption ounp.Option, matchCtx *o
buf := make([]byte, 1024)
LOOP:
for indexR := 0; indexR < pingOption.GetRetry(); indexR++ {
for indexR := 0; indexR < pingOption.GetCount(); indexR++ {
startTime := time.Now()
matchCtx.InitAttribute()
packetCount := _matcher.PacketCount(matchCtx)

View File

@ -43,7 +43,7 @@ func TestPing(t *testing.T) {
"HTTP",
),
pingOption: &ounp.PingOption{
Retry: 3,
Count: 3,
},
},
},