TUN-2823: Bugfix. cloudflared would hang forever if error occurred.
This commit is contained in:
parent
6dcf3a4cbc
commit
32df01a9da
|
@ -323,8 +323,13 @@ func ServeTunnel(
|
||||||
})
|
})
|
||||||
|
|
||||||
errGroup.Go(func() error {
|
errGroup.Go(func() error {
|
||||||
<-reconnectCh
|
select {
|
||||||
|
case <-reconnectCh:
|
||||||
return fmt.Errorf("received disconnect signal")
|
return fmt.Errorf("received disconnect signal")
|
||||||
|
case <-serveCtx.Done():
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
errGroup.Go(func() error {
|
errGroup.Go(func() error {
|
||||||
|
|
Loading…
Reference in New Issue