1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine buffer read socket logic.

This commit is contained in:
winlin 2013-10-19 16:52:22 +08:00
parent 496c5ecfde
commit 25468e4ff8

View file

@ -62,10 +62,10 @@ int SrsBuffer::ensure_buffer_bytes(SrsSocket* skt, int required_size)
{
int ret = ERROR_SUCCESS;
ssize_t nread;
while (size() < required_size) {
char buffer[SOCKET_READ_SIZE];
ssize_t nread;
if ((ret = skt->read(buffer, SOCKET_READ_SIZE, &nread)) != ERROR_SUCCESS) {
return ret;
}