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")
|
||||
stayHere = false
|
||||
case err := <-waitError: // unexpected error
|
||||
close(waitError)
|
||||
closeStreams()
|
||||
|
||||
unboundCancel()
|
||||
|
||||
@@ -96,8 +96,6 @@ func (l *Loop) Run(ctx context.Context, done chan<- struct{}) {
|
||||
l.logger.Info("starting")
|
||||
stayHere = false
|
||||
case err := <-waitError: // unexpected error
|
||||
close(waitError)
|
||||
|
||||
l.statusManager.Lock() // prevent SetStatus from running in parallel
|
||||
|
||||
l.cleanup(context.Background(), portForwarding)
|
||||
|
||||
Reference in New Issue
Block a user