INcrease the delay between reading chunks of the RTSP message, may it less likely to overwhelm the CPU.

This commit is contained in:
Mike Brady
2019-01-08 13:00:00 +00:00
parent 1b3d64ce85
commit c3668b3fc0
+1 -1
View File
@@ -674,7 +674,7 @@ do {
size_t read_chunk = msg_size - inbuf;
if (read_chunk > max_read_chunk)
read_chunk = max_read_chunk;
usleep(40000); // wait about 40 milliseconds between reads of up to about 64 kB
usleep(80000); // wait about 80 milliseconds between reads of up to about 64 kB
nread = read(conn->fd, buf + inbuf, read_chunk);
if (!nread) {
reply = rtsp_read_request_response_error;