Encountered behaviour
Cave checks if it is online but fails the test. There is, however, an active internet connection.
Expected behaviour
Cave should work with an existing connection. There should be a more robust connection test or a override option.
Troubleshooting
I believe the test comes from the following snippet, but is is too stringent.
|
fn internet_available() -> bool { |
|
TcpStream::connect_timeout( |
|
&"8.8.8.8:53".parse().unwrap(), // Google DNS |
|
Duration::from_secs(2), |
|
) |
|
.is_ok() |
|
} |
I have tried to replicate it through the console :
ClementPhan:~$ cave list
17.3.1
ClementPhan:~$ cave available
Error: No internet connection detected. Please check your network and try again.
ClementPhan:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=106 time=16.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=106 time=17.0 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=106 time=16.3 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 16.222/16.487/16.952/0.329 ms
ClementPhan:~$ netcat -v 8.8.8.8 53
netcat: connect to 8.8.8.8 port 53 (tcp) failed: Connection timed out
ClementPhan:~$ netcat -v google.com 80
Connection to google.com (172.217.22.110) 80 port [tcp/http] succeeded!
^C
Encountered behaviour
Cave checks if it is online but fails the test. There is, however, an active internet connection.
Expected behaviour
Cave should work with an existing connection. There should be a more robust connection test or a override option.
Troubleshooting
I believe the test comes from the following snippet, but is is too stringent.
cave/src/manage.rs
Lines 344 to 350 in 9221c17
I have tried to replicate it through the console :