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 {
|
||||
<-reconnectCh
|
||||
return fmt.Errorf("received disconnect signal")
|
||||
select {
|
||||
case <-reconnectCh:
|
||||
return fmt.Errorf("received disconnect signal")
|
||||
case <-serveCtx.Done():
|
||||
return nil
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
errGroup.Go(func() error {
|
||||
|
|
Loading…
Reference in New Issue