diff --git a/screens/HomeScreen.tsx b/screens/HomeScreen.tsx index b9ba2fb..d78cd26 100644 --- a/screens/HomeScreen.tsx +++ b/screens/HomeScreen.tsx @@ -287,7 +287,7 @@ export default class HomeScreen extends Component { componentWillUnmount() { proxyBackgroundService.setNotificationTapHandler(null); - this.stopProxyClient(); + void this.stopProxyClient(); this.appStateSubscription?.remove(); } @@ -348,10 +348,10 @@ export default class HomeScreen extends Component { } } - stopProxyClient() { + async stopProxyClient() { try { - void proxyBackgroundService.syncRebindConfig(null); - proxyBackgroundService.stop(); + await proxyBackgroundService.syncRebindConfig(null); + await proxyBackgroundService.stop(); } catch { /* ignore */ }