Skip to content

Commit

Permalink
Fix Client Cache issues
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownOre authored Apr 1, 2024
1 parent 600778a commit aeab79a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions server/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,6 @@ func (s *Session) sendChunks() {
func (s *Session) handleWorldSwitch(w *world.World) {
if s.conn.ClientCacheEnabled() {
s.blobMu.Lock()
// Force out all blobs before changing worlds. This ensures no outdated chunk loading in the new world.
resp := &packet.ClientCacheMissResponse{Blobs: make([]protocol.CacheBlob, 0, len(s.blobs))}
for h, blob := range s.blobs {
resp.Blobs = append(resp.Blobs, protocol.CacheBlob{Hash: h, Payload: blob})
}
s.writePacket(resp)

s.blobs = map[uint64][]byte{}
s.openChunkTransactions = nil
s.blobMu.Unlock()
Expand Down

0 comments on commit aeab79a

Please sign in to comment.