diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-30 20:12:57 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-30 20:12:57 +0100 |
| commit | 1f91f8aae0fb5e77583625a945c273b85f9a25e3 (patch) | |
| tree | e327a5c8e96103cc508791cfe640dc19c5e6a685 /server/src/main.rs | |
| parent | ec28ab3e6f39333ab9052e84b57467f310116a3c (diff) | |
| download | hurrycurry-1f91f8aae0fb5e77583625a945c273b85f9a25e3.tar hurrycurry-1f91f8aae0fb5e77583625a945c273b85f9a25e3.tar.bz2 hurrycurry-1f91f8aae0fb5e77583625a945c273b85f9a25e3.tar.zst | |
Remove inactive player
Diffstat (limited to 'server/src/main.rs')
| -rw-r--r-- | server/src/main.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index 3bf39f5a..55085f40 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -261,6 +261,11 @@ async fn run(data_path: PathBuf, args: Args) -> anyhow::Result<()> { } }; } + while let Ok(packet) = replies_rx.try_recv() { + if send_packet(id, &mut sock, packet).await { + break; + }; + } state.write().await.disconnect(id, None); sleep(Duration::from_millis(100)).await; // avoids potential godot bug where disconnect packets are lost }); |