mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-26 10:09:19 +02:00
Fix #34, send pings only every 5 seconds
This commit is contained in:
parent
166fb4b6c7
commit
c82280c600
|
@ -232,6 +232,8 @@ tunnel_dns(int tun_fd, int dns_fd)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
write_tun(tun_fd, out, outlen);
|
write_tun(tun_fd, out, outlen);
|
||||||
|
|
||||||
|
/* Server may have more data to send me, ask for it */
|
||||||
if (!is_sending())
|
if (!is_sending())
|
||||||
send_ping(dns_fd);
|
send_ping(dns_fd);
|
||||||
|
|
||||||
|
@ -249,7 +251,7 @@ tunnel(int tun_fd, int dns_fd)
|
||||||
rv = 0;
|
rv = 0;
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
tv.tv_sec = 1;
|
tv.tv_sec = 5;
|
||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
|
|
Loading…
Reference in New Issue