Skip to content

Commit

Permalink
increase invalid packet count before displaying message
Browse files Browse the repository at this point in the history
  • Loading branch information
IceDynamix committed Oct 25, 2024
1 parent 1e1822f commit c4578b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ where
if commands.is_empty() {
invalid += 1;

if invalid >= 50 && !warning_sent {
if invalid >= 100 && !warning_sent {
error!(
"received a large number of packets that could not be parsed"
);
Expand All @@ -215,7 +215,7 @@ where
warning_sent = true;
}
} else {
invalid -= 10;
invalid = 0.max(invalid - 1);

for command in commands {
if command.command_id == PlayerLoginScRsp {
Expand Down

0 comments on commit c4578b7

Please sign in to comment.