@@ -328,7 +328,7 @@ start:
328328 return
329329 }
330330
331- // If v.maxVers[0] is non-negative, then we loaded API
331+ // If v.maxVersion(0) is non-negative, then we loaded API
332332 // versions. If the version for this request is negative, we
333333 // know the broker cannot handle this request.
334334 if v .maxVersion (0 ) >= 0 && v .maxVersion (req .Key ()) < 0 {
@@ -881,9 +881,9 @@ func (cxn *brokerCxn) sasl() error {
881881 req := kmsg .NewPtrSASLHandshakeRequest ()
882882
883883start:
884- if mechanism .Name () != "GSSAPI" && v .maxVers [ req .Key ()] >= 0 {
884+ if mechanism .Name () != "GSSAPI" && v .maxVersion ( req .Key ()) >= 0 {
885885 req .Mechanism = mechanism .Name ()
886- req .Version = v .maxVers [ req .Key ()]
886+ req .Version = v .maxVersion ( req .Key ())
887887 cxn .cl .cfg .logger .Log (LogLevelDebug , "issuing SASLHandshakeRequest" , "broker" , logID (cxn .b .meta .NodeID ))
888888 corrID , bytesWritten , writeWait , timeToWrite , readEnqueue , writeErr := cxn .writeRequest (nil , time .Now (), req )
889889 if writeErr != nil {
@@ -970,7 +970,7 @@ func (cxn *brokerCxn) doSasl(authenticate bool) error {
970970 } else {
971971 req := kmsg .NewPtrSASLAuthenticateRequest ()
972972 req .SASLAuthBytes = clientWrite
973- req .Version = cxn .b .loadVersions ().maxVers [ req .Key ()]
973+ req .Version = cxn .b .loadVersions ().maxVersion ( req .Key ())
974974 cxn .cl .cfg .logger .Log (LogLevelDebug , "issuing SASLAuthenticate" , "broker" , logID (cxn .b .meta .NodeID ), "version" , req .Version , "step" , step )
975975
976976 // Lifetime: we take the timestamp before we write our
0 commit comments