Commit 1fac12f1 authored by 谢宇轩's avatar 谢宇轩

fix: 对象池回收异常

parent d6639249
......@@ -69,6 +69,7 @@ func DefaultLog(sourceKey string, message string) (Matedata, error) {
mateItem.Data["message"] = message
result := *mateItem
mateItem.reset()
MatePool.Put(vMateItem)
return result, nil
}
......@@ -89,6 +90,7 @@ func DefaultJsonLog(sourceKey string, message string) (Matedata, error) {
mateItem.Data = data
result := *mateItem
mateItem.reset()
MatePool.Put(vMateItem)
return result, nil
}
......@@ -120,7 +120,7 @@ func ReadingMessage(ctx context.Context, c *Customer) {
}
matedata, err = c.Format(string(reader.Config().Topic), string(m.Value))
matedata, err = c.Format(reader.Config().Topic, string(m.Value))
matedata.SourceAgent = "默认节点"
for _, header := range m.Headers {
if header.Key == "source_agent" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment