If the socket dies (read returns 0=EOF), return immediately.

(Closes issue #12637)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Tilghman Lesher 18 years ago
parent f1696e2133
commit 2fc71fe563

@ -2307,7 +2307,7 @@ static void ast_remotecontrol(char * data)
char buf[512] = "", *curline = buf, *nextline;
int not_written = 1;
if (read(ast_consock, buf, sizeof(buf) - 1) < 0) {
if (read(ast_consock, buf, sizeof(buf) - 1) <= 0) {
break;
}

Loading…
Cancel
Save