refine buffer read socket logic.

pull/133/head
winlin 11 years ago
parent 496c5ecfde
commit 25468e4ff8

@ -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;
}

Loading…
Cancel
Save