-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Zeppelin/server/session/std/chunkLoadWorker.go
Lines 91 to 108 in a29bd9c
| buf := buffers.Buffers.Get().(*bytes.Buffer) | |
| for x := chunkX - viewDistance; x < chunkX+viewDistance; x++ { | |
| for z := chunkZ - viewDistance; z < chunkZ+viewDistance; z++ { | |
| buf.Reset() | |
| c, err := session.Dimension().GetChunkBuf(x, z, buf) | |
| if err != nil { | |
| continue | |
| } | |
| buf.Reset() | |
| if err := session.WritePacket(c.EncodeBuf(session.registryIndexes["minecraft:worldgen/biome"], buf)); err != nil { | |
| return err | |
| } | |
| chunks++ | |
| } | |
| } | |
| buffers.Buffers.Put(buf) |
I'm not a Go programmer so excuse me, but if what I think is correct, then a failure in WritePacket can lead to a resource leak.
Metadata
Metadata
Assignees
Labels
No labels