summaryrefslogtreecommitdiff
path: root/include/net/conn.hpp
diff options
context:
space:
mode:
authorhovertank3d <[email protected]>2026-02-23 20:57:50 +0100
committerhovertank3d <[email protected]>2026-02-23 20:57:50 +0100
commit8fb22cb94db805d6ff5f7a99fdd49fcfb33c5269 (patch)
tree903ebf3bbc3e6160f52a31eb519e17ae09019193 /include/net/conn.hpp
parent6c79fe43fe2d6bbbb2808777e5553a7360b37d22 (diff)
downloadogurec-8fb22cb94db805d6ff5f7a99fdd49fcfb33c5269.tar.gz
ogurec-8fb22cb94db805d6ff5f7a99fdd49fcfb33c5269.zip
ignore id=0 messages. it seems terraria sends it before EOF, or i have a bug in IO
Diffstat (limited to 'include/net/conn.hpp')
-rw-r--r--include/net/conn.hpp2
1 files changed, 1 insertions, 1 deletions
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<uint8_t> payload(len);
rw.read(payload);