Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion mobile/mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,15 @@ func StopClient() {
if done != nil {
select {
case <-done:
case <-time.After(3 * time.Second):
case <-time.After(1 * time.Second):
// The carrier shutdown took longer than 1s. The outer
// Android caller (GooseRelayVpnService.stopVpn) caps total
// disconnect with a 5s outer join, so we return promptly
// here and let the outer caller decide whether to log a
// "stop timed out" message. StopTun/StopTunBridge below are
// idempotent and safe to call even if the carrier is still
// winding down.
log.Printf("[client] carrier shutdown exceeded 1s, proceeding with TUN teardown")
}
}

Expand Down
Loading