mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-03 21:21:12 +08:00
Catch possible select syscall interruption
This commit is contained in:
parent
7e7b4461fb
commit
9bf3c6e64d
@ -488,7 +488,7 @@ int run_vpn(pcapdroid_t *pd) {
|
||||
FD_SET(pd->vpn.tunfd, &fdset);
|
||||
max_fd = max(max_fd, pd->vpn.tunfd);
|
||||
|
||||
if(select(max_fd + 1, &fdset, &wrfds, NULL, &timeout) < 0) {
|
||||
if((select(max_fd + 1, &fdset, &wrfds, NULL, &timeout) < 0) && (errno != EINTR)) {
|
||||
log_e("select failed[%d]: %s", errno, strerror(errno));
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user