mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
connection::thread_loop(): Break on zero reads
This commit is contained in:
parent
93882f79b9
commit
158ab85715
1 changed files with 2 additions and 0 deletions
|
@ -114,6 +114,8 @@ connection::thread_loop(void)
|
|||
len = read(fd, cbuf, sizeof(cbuf));
|
||||
if (len < 0) {
|
||||
error = true;
|
||||
} else if (len == 0) {
|
||||
break;
|
||||
} else {
|
||||
bool want_moar = false;
|
||||
pthread_mutex_lock(&buf_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue