Browse Source

add missing error check

Johannes Brüderl 6 years ago
parent
commit
b4a8a4a8f6
1 changed files with 4 additions and 1 deletions
  1. 4 1
      metadata_response.go

+ 4 - 1
metadata_response.go

@@ -223,7 +223,10 @@ func (r *MetadataResponse) encode(pe packetEncoder) error {
 	}
 
 	if r.Version >= 2 {
-		pe.putNullableString(r.ClusterID)
+		err := pe.putNullableString(r.ClusterID)
+		if err != nil {
+			return err
+		}
 	}
 
 	if r.Version >= 1 {