Remove speedtest (#42)

* Remove speedtest

* Go mod tidy
This commit is contained in:
DG
2021-08-09 22:23:21 -04:00
committed by GitHub
parent e4c79030a7
commit 61f5779346
6 changed files with 1 additions and 77 deletions

View File

@@ -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})