Fix public IP on restarts, refers to 359

This commit is contained in:
Quentin McGaw
2021-01-29 00:06:55 +00:00
parent bc83b75634
commit 5194361f3b
3 changed files with 35 additions and 32 deletions

View File

@@ -16,7 +16,7 @@ import (
)
type Looper interface {
Run(ctx context.Context, wg *sync.WaitGroup, dnsReadyCh chan<- struct{})
Run(ctx context.Context, wg *sync.WaitGroup)
RunRestartTicker(ctx context.Context, wg *sync.WaitGroup)
GetStatus() (status models.LoopStatus)
SetStatus(status models.LoopStatus) (outcome string, err error)
@@ -83,7 +83,7 @@ func (l *looper) logAndWait(ctx context.Context, err error) {
}
}
func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup, dnsReadyCh chan<- struct{}) {
func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup) {
defer wg.Done()
const fallback = false
@@ -136,8 +136,6 @@ func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup, dnsReadyCh chan<-
closeStreams = func() {}
}
dnsReadyCh <- struct{}{}
stayHere := true
for stayHere {
select {