diff --git a/p2psrv/server.go b/p2psrv/server.go index 040bbb3c3..188fd2ce6 100644 --- a/p2psrv/server.go +++ b/p2psrv/server.go @@ -397,7 +397,7 @@ func isIncompatible(peerName string) bool { // Extract the semantic version from the name peerVersion := versionRegex.FindString(peerName) if peerVersion == "" { - return false + return true } major := strings.Split(peerVersion, ".")[0] diff --git a/p2psrv/server_test.go b/p2psrv/server_test.go index bd87e2798..4566c5dcf 100644 --- a/p2psrv/server_test.go +++ b/p2psrv/server_test.go @@ -93,6 +93,14 @@ func TestIsIncompatible(t *testing.T) { peerName: "thor/v3.1.1-88c7c86-release/linux/go1.21.9", expected: false, }, + { + peerName: "", + expected: true, + }, + { + peerName: "thor/v1.bad.v-88c7c86-release/linux/go1.21.9", + expected: true, + }, } for _, tc := range testCases {