summaryrefslogtreecommitdiffstats
path: root/contrib/Socket.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-05-11 21:06:04 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-05-11 21:30:01 +0200
commit7867dadc168c9130c0aa569a48abbafa1cb075e7 (patch)
treec51e49356da010878685cea1f2368c3d92aff6cd /contrib/Socket.cpp
parent55fe285c56055497725a619e5b9acbd6dec57e23 (diff)
downloadODR-AudioEnc-7867dadc168c9130c0aa569a48abbafa1cb075e7.tar.gz
ODR-AudioEnc-7867dadc168c9130c0aa569a48abbafa1cb075e7.tar.bz2
ODR-AudioEnc-7867dadc168c9130c0aa569a48abbafa1cb075e7.zip
Update common EDI changes
Diffstat (limited to 'contrib/Socket.cpp')
-rw-r--r--contrib/Socket.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/Socket.cpp b/contrib/Socket.cpp
index 159de7e..bc1b179 100644
--- a/contrib/Socket.cpp
+++ b/contrib/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<uint8_t>& buffer)
}
m_queue.push(buffer);
+
+ if (m_queue.size() > MAX_QUEUE_SIZE) {
+ vector<uint8_t> discard;
+ m_queue.try_pop(discard);
+ }
}
void TCPSendClient::process()