Fix: empty connection for NordVPN and Windscribe

This commit is contained in:
Quentin McGaw
2021-01-31 18:45:58 +00:00
parent 982c50c756
commit dd5a9c6067
4 changed files with 3 additions and 20 deletions

View File

@@ -2,8 +2,6 @@ package openvpn
import (
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"strings"
@@ -120,17 +118,6 @@ func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup) {
l.cancel()
return
}
if connection.IP == nil {
serverSelectionJSON, _ := json.Marshal(settings.Provider.ServerSelection)
connectionJSON, _ := json.Marshal(connection)
message := fmt.Sprintf(`
PLEASE CREATE AN ISSUE with this log: https://github.com/qdm12/gluetun/issues
Server selection: %s
AllServers count: %d
connection: %s
`, string(serverSelectionJSON), allServers.Count(), string(connectionJSON))
panic(message)
}
lines := providerConf.BuildConf(connection, l.username, settings)
if err := writeOpenvpnConf(lines, l.openFile); err != nil {