MCPcopy
hub / github.com/syncthing/syncthing / IsVersionMismatch

Function IsVersionMismatch

lib/protocol/bep_hello.go:77–79  ·  view source on GitHub ↗

IsVersionMismatch returns true if the error is a reliable indication of a version mismatch that we might want to alert the user about.

(err error)

Source from the content-addressed store, hash-verified

75// IsVersionMismatch returns true if the error is a reliable indication of a
76// version mismatch that we might want to alert the user about.
77func IsVersionMismatch(err error) bool {
78 return errors.Is(err, ErrTooOldVersion) || errors.Is(err, ErrUnknownMagic)
79}
80
81func readHello(c io.Reader) (Hello, error) {
82 header := make([]byte, 4)

Callers 1

handleHellosMethod · 0.92

Calls 1

IsMethod · 0.45

Tested by

no test coverage detected