mirror of
https://github.com/davegallant/vpngate.git
synced 2025-08-07 09:02:31 +00:00
@@ -3,10 +3,8 @@ package vpn
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/davegallant/vpngate/pkg/exec"
|
||||
"github.com/davegallant/vpngate/pkg/network"
|
||||
"github.com/juju/errors"
|
||||
"github.com/nxadm/tail"
|
||||
"github.com/rs/zerolog/log"
|
||||
@@ -21,17 +19,6 @@ func Connect(configPath string) error {
|
||||
}
|
||||
defer os.Remove(tmpLogFile.Name())
|
||||
|
||||
go func() {
|
||||
for {
|
||||
err = network.TestSpeed()
|
||||
if err != nil {
|
||||
log.Error().Msg("Failed to test network speed")
|
||||
}
|
||||
time.Sleep(time.Minute)
|
||||
}
|
||||
|
||||
}()
|
||||
|
||||
go func() {
|
||||
// Tail the temporary openvpn log file
|
||||
t, err := tail.TailFile(tmpLogFile.Name(), tail.Config{Follow: true})
|
||||
|
Reference in New Issue
Block a user