Commit b1cbe333 authored by Eric Wong's avatar Eric Wong

interface: abort if we expire while processing lines

If we keep processing expired interfaces in a loop, we'll eventually close it and get fd < 0, causing assertions to fail. git-svn-id: https://svn.musicpd.org/mpd/trunk@7168 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 2fcd63fe
......@@ -367,6 +367,8 @@ static int processBytesRead(Interface * interface, int bytesRead)
*(buf_tail - 1) = '\0';
}
ret = processLineOfInput(interface);
if (interface->expired)
return ret;
interface->bufferPos = interface->bufferLength;
}
if (interface->bufferLength == INTERFACE_MAX_BUFFER_LENGTH) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment