fix(vpn): do not close wait error channel on consumer side
This commit is contained in:
@@ -86,7 +86,6 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
|
|||||||
l.logger.Info("starting")
|
l.logger.Info("starting")
|
||||||
stayHere = false
|
stayHere = false
|
||||||
case err := <-waitError: // unexpected error
|
case err := <-waitError: // unexpected error
|
||||||
close(waitError)
|
|
||||||
closeStreams()
|
closeStreams()
|
||||||
|
|
||||||
unboundCancel()
|
unboundCancel()
|
||||||
|
|||||||
@@ -96,8 +96,6 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
|
|||||||
l.logger.Info("starting")
|
l.logger.Info("starting")
|
||||||
stayHere = false
|
stayHere = false
|
||||||
case err := <-waitError: // unexpected error
|
case err := <-waitError: // unexpected error
|
||||||
close(waitError)
|
|
||||||
|
|
||||||
l.statusManager.Lock() // prevent SetStatus from running in parallel
|
l.statusManager.Lock() // prevent SetStatus from running in parallel
|
||||||
|
|
||||||
l.cleanup(context.Background(), portForwarding)
|
l.cleanup(context.Background(), portForwarding)
|
||||||
|
|||||||
Reference in New Issue
Block a user