mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 02:13:35 +02:00
connection::thread_loop(): Try harder to catch dead sockets
This commit is contained in:
parent
04fc7b4b7a
commit
12724c016d
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ connection::thread_loop(void)
|
||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
FD_SET(fd, &rfds);
|
FD_SET(fd, &rfds);
|
||||||
while (select(fd + 1, &rfds, NULL, NULL, &tv)) {
|
while (select(fd + 1, &rfds, NULL, &rfds, &tv)) {
|
||||||
char cbuf[1024];
|
char cbuf[1024];
|
||||||
len = read(fd, cbuf, sizeof(cbuf));
|
len = read(fd, cbuf, sizeof(cbuf));
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue