"crypto/subtle"
"errors"
"io"
- "net"
"os"
"path/filepath"
"sort"
go func() {
state.pings <- struct{}{}
state.wg.Done()
- state.Ctx.LogD("HERE", SDS{}, "PING GOROUTINE QUIT")
}()
}
}
break
}
unmarshalErr := err.(*xdr.UnmarshalError)
- netErr, ok := unmarshalErr.Err.(net.Error)
- if ok && netErr.Timeout() {
+ if os.IsTimeout(unmarshalErr.Err) {
continue
}
if unmarshalErr.ErrorCode == xdr.ErrIO {
state.Ctx.LogE("sp-process", sds, err, "")
return nil, err
}
+ if head.Type != SPTypePing {
+ state.RxLastNonPing = state.RxLastSeen
+ }
switch head.Type {
case SPTypeHalt:
state.Ctx.LogD("sp-process", SdsAdd(sds, SDS{"type": "halt"}), "")
)
return nil, BadPktType
}
- if head.Type != SPTypePing {
- state.RxLastNonPing = state.RxLastSeen
- }
}
if infosGot {
var pkts int