From f8cc6785dfd1f987f403d6ed277e348dabbddc90 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Wed, 1 Jan 2020 11:00:54 +1000 Subject: [PATCH] Fix typo and use of hard-coded value --- src/control.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/control.cc b/src/control.cc index ec8217d..061cce0 100644 --- a/src/control.cc +++ b/src/control.cc @@ -1014,9 +1014,9 @@ bool control_conn_t::data_ready() noexcept return false; } } - else if (rbuf.get_length() == 1024) { + else if (rbuf.get_length() == rbuf.get_size()) { // Too big packet - log(loglevel_t::WARN, "Received too-large control package; dropping connection"); + log(loglevel_t::WARN, "Received too-large control packet; dropping connection"); bad_conn_close = true; iob.set_watches(OUT_EVENTS); } -- 2.25.1