fix(notice): check connection using ohmyposh.dev

resolves #5485
This commit is contained in:
Jan De Dobbeleer 2024-08-21 07:34:00 +00:00
parent bffde60751
commit a0dffad62d

View file

@ -5,10 +5,10 @@ import (
"time" "time"
) )
// if we can connect to google within 200ms, we are connected // if we can connect to ohmyposh within 200ms, we are connected
// otherwise, let's consider being offline // otherwise, let's consider being offline
func IsConnected() bool { func IsConnected() bool {
timeout := 200 * time.Millisecond timeout := 200 * time.Millisecond
_, err := net.DialTimeout("tcp", "google.com:80", timeout) _, err := net.DialTimeout("tcp", "ohmyposh.dev:80", timeout)
return err == nil return err == nil
} }