diff --git a/mc/client/client.go b/mc/client/client.go index a141ff1..af68166 100644 --- a/mc/client/client.go +++ b/mc/client/client.go @@ -2,6 +2,7 @@ package client import ( "context" + "errors" "net" "github.com/admin-else/strom/mc/data" @@ -21,6 +22,10 @@ func Connect(ctx context.Context, addr string, version string) (ret *proto.Conn, if err != nil { return } + if s.Version.Protocol == 0 { + err = errors.New("server didnt return protocol version") + return + } protocolVersion = s.Version.Protocol } else { var v data.VersionInfo