X-Git-Url: https://plomlompom.com/repos/?p=plomrogue;a=blobdiff_plain;f=plomrogue-server.py;h=d6c1930da2613a88c98e844b830b861c9fd2c482;hp=b921f4baa0ee9c6e8c3a122270f65ab718dfe73d;hb=21ba1d03b1e883564d301c2781039017dd704b20;hpb=958b6c83c660169d9f0dfc15079a413e05b89197 diff --git a/plomrogue-server.py b/plomrogue-server.py index b921f4b..d6c1930 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -270,7 +270,9 @@ def try_worldstate_update(): string = string + line + "\n" # TODO: no proper user-subjective map atomic_write(io_db["path_worldstate"], string) - atomic_write(io_db["path_out"], "WORLD_UPDATED\n", do_append=True) + io_db["file_out"].write("WORLD_UPDATED\n") + io_db["file_out"].flush() + os.fsync(io_db["file_out"]) io_db["worldstate_updateable"] = False @@ -416,6 +418,7 @@ def command_ping(): """Send PONG line to server output file.""" io_db["file_out"].write("PONG\n") io_db["file_out"].flush() + os.fsync(io_db["file_out"].fileno()) def command_quit():