From 8fb22cb94db805d6ff5f7a99fdd49fcfb33c5269 Mon Sep 17 00:00:00 2001 From: hovertank3d Date: Mon, 23 Feb 2026 20:57:50 +0100 Subject: ignore id=0 messages. it seems terraria sends it before EOF, or i have a bug in IO --- include/net/conn.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/net') diff --git a/include/net/conn.hpp b/include/net/conn.hpp index 6cd6024..1e8ac23 100644 --- a/include/net/conn.hpp +++ b/include/net/conn.hpp @@ -108,7 +108,7 @@ public: { auto [id, len] = read_header(); if (id == 0) { - throw std::runtime_error("invalid message id"); + return; } std::vector payload(len); rw.read(payload); -- cgit v1.2.3