1 parent 2b0ba1b commit 3877ce6Copy full SHA for 3877ce6
1 file changed
mobile/mobile.go
@@ -239,7 +239,15 @@ func StopClient() {
239
if done != nil {
240
select {
241
case <-done:
242
- case <-time.After(3 * time.Second):
+ case <-time.After(1 * time.Second):
243
+ // The carrier shutdown took longer than 1s. The outer
244
+ // Android caller (GooseRelayVpnService.stopVpn) caps total
245
+ // disconnect with a 5s outer join, so we return promptly
246
+ // here and let the outer caller decide whether to log a
247
+ // "stop timed out" message. StopTun/StopTunBridge below are
248
+ // idempotent and safe to call even if the carrier is still
249
+ // winding down.
250
+ log.Printf("[client] carrier shutdown exceeded 1s, proceeding with TUN teardown")
251
}
252
253
0 commit comments