1
0
mirror of https://github.com/go-ping/ping.git synced 2025-05-07 06:56:24 +00:00

Make default Timeout "forever"

Make the default Timeout setting the maximum Go Duration, which is
290 years. Effectively forever.

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Ben Kochie 2020-11-06 14:02:07 +01:00 committed by Charlie Jonas
parent 52eed920f9
commit b6486c6f1f

View File

@ -91,7 +91,7 @@ func New(addr string) *Pinger {
Interval: time.Second,
RecordRtts: true,
Size: timeSliceLength,
Timeout: time.Second * 100000,
Timeout: time.Duration(math.MaxInt64),
Tracker: r.Int63n(math.MaxInt64),
addr: addr,