From b4d788a065fb3338df26c44a94d804c194af4955 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 11 May 2020 21:04:18 +0200 Subject: Update common EDI input and adapt to API changes --- lib/Socket.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/Socket.cpp') diff --git a/lib/Socket.cpp b/lib/Socket.cpp index 159de7e..bc1b179 100644 --- a/lib/Socket.cpp +++ b/lib/Socket.cpp @@ -2,7 +2,7 @@ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) - Copyright (C) 2019 + Copyright (C) 2020 Matthias P. Braendli, matthias.braendli@mpb.li http://www.opendigitalradio.org @@ -932,6 +932,11 @@ void TCPSendClient::sendall(const std::vector& buffer) } m_queue.push(buffer); + + if (m_queue.size() > MAX_QUEUE_SIZE) { + vector discard; + m_queue.try_pop(discard); + } } void TCPSendClient::process() -- cgit v1.2.3