Skip to content

Commit 846b6ed

Browse files
authored
Merge pull request #1393 Add guarantee about memory release from the message content
2 parents c78681e + f9b4124 commit 846b6ed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/topic/topicreadercommon/message.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ func (m *PublicMessage) UnmarshalTo(dst PublicMessageContentUnmarshaler) error {
6666
// Read implements io.Reader
6767
// Read uncompressed message content
6868
// return topicreader.UnexpectedCodec if message compressed with unknown codec
69+
//
70+
// Content of the message released from the memory after first read error
71+
// including io.EOF.
6972
func (m *PublicMessage) Read(p []byte) (n int, err error) {
7073
m.dataConsumed = true
7174

0 commit comments

Comments
 (0)