Add panic checks

This commit is contained in:
Quentin McGaw
2021-01-29 00:32:43 +00:00
parent 5194361f3b
commit 4abb8cd87f
2 changed files with 6 additions and 0 deletions

View File

@@ -118,6 +118,9 @@ func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup) {
l.cancel()
return
}
if connection.IP == nil {
panic("PLEASE CREATE AN ISSUE with this log: https://github.com/qdm12/gluetun/issues")
}
lines := providerConf.BuildConf(connection, l.username, settings)
if err := writeOpenvpnConf(lines, l.openFile); err != nil {