Skip to content

Commit

Permalink
Merge pull request #124 from evgfedotov/fix/check-kind-map
Browse files Browse the repository at this point in the history
Fix: Append check on IsMap in pool message generation
  • Loading branch information
vmg committed Jan 29, 2024
2 parents e7d7219 + 3aa6540 commit 2cc4577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion features/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (p *pool) message(message *protogen.Message) {
} else {
switch field.Desc.Kind() {
case protoreflect.MessageKind, protoreflect.GroupKind:
if p.ShouldPool(field.Message) {
if !field.Desc.IsMap() && p.ShouldPool(field.Message) {
p.P(`m.`, fieldName, `.ReturnToVTPool()`)
}
case protoreflect.BytesKind:
Expand Down

0 comments on commit 2cc4577

Please sign in to comment.