Fix server-side disconnect bug
This commit is contained in:
parent
320dd16889
commit
04f0b8d9d7
2 changed files with 5 additions and 3 deletions
3
maps.py
3
maps.py
|
|
@ -211,7 +211,8 @@ class Map():
|
||||||
#self.load_visible()
|
#self.load_visible()
|
||||||
|
|
||||||
def apply_changes(self, changes):
|
def apply_changes(self, changes):
|
||||||
self.chunkpool.apply_changes(changes)
|
with self.chunkpool as pool:
|
||||||
|
pool.apply_changes(changes)
|
||||||
|
|
||||||
ChunkStyle = namedtuple("ChunkStyle", "string color")
|
ChunkStyle = namedtuple("ChunkStyle", "string color")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ class WotServer(WebSocket):
|
||||||
|
|
||||||
def handle_unload_chunks(self, coords):
|
def handle_unload_chunks(self, coords):
|
||||||
for coor in coords:
|
for coor in coords:
|
||||||
pos = Position(coor)
|
pos = Position(coor[0], coor[1])
|
||||||
|
if pos in self.loaded_chunks:
|
||||||
self.loaded_chunks.remove(pos)
|
self.loaded_chunks.remove(pos)
|
||||||
|
|
||||||
def handle_save_changes(self, dchanges):
|
def handle_save_changes(self, dchanges):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue