mtpd: keep checking if any lower VPN layer dies.
Change-Id: Idd4dfa813a2db16d9b95f71fefb67509804261a0
diff --git a/mtpd.c b/mtpd.c
index cff5712..c005567 100644
--- a/mtpd.c
+++ b/mtpd.c
@@ -199,13 +199,16 @@
if (pollfds[2].revents) {
interrupt(SIGTERM);
}
+ timeout = pollfds[0].revents ?
+ the_protocol->process() : the_protocol->timeout();
#ifdef ANDROID_CHANGES
if (!access("/data/misc/vpn/abort", F_OK)) {
interrupt(SIGTERM);
}
+ if (!timeout) {
+ timeout = 5000;
+ }
#endif
- timeout = pollfds[0].revents ?
- the_protocol->process() : the_protocol->timeout();
}
if (timeout < 0) {