mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-05 09:00:23 +08:00
TUN-2823: Bugfix. cloudflared would hang forever if error occurred.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user