mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
Client did not reconnect properly to server when server app restarts.
When Read() on the command channel failed, the buffer size was not trimmed. Read() was never called again as the buffer appeared to be full. Fixes #322 reported by alexw.
This commit is contained in:
parent
e9bd0c96f3
commit
c8bf0474f9
@ -140,8 +140,10 @@ ssize_t cTBSource::ReadUntil(void *Buffer, size_t Length, const char *Seq,
|
|||||||
|
|
||||||
len = m_LineBuffer.size();
|
len = m_LineBuffer.size();
|
||||||
m_LineBuffer.resize(BUFSIZ);
|
m_LineBuffer.resize(BUFSIZ);
|
||||||
if ((b = Read((char*)m_LineBuffer.data() + len, BUFSIZ - len)) == -1)
|
if ((b = Read((char*)m_LineBuffer.data() + len, BUFSIZ - len)) == -1) {
|
||||||
|
m_LineBuffer.resize(len);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
m_LineBuffer.resize(len + b);
|
m_LineBuffer.resize(len + b);
|
||||||
|
|
||||||
if ((len = m_LineBuffer.find(Seq)) != (size_t)-1) {
|
if ((len = m_LineBuffer.find(Seq)) != (size_t)-1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user