mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Make sure interface is valid when checking for GC
PiperOrigin-RevId: 700764816
This commit is contained in:
@@ -52,7 +52,10 @@ bool WifiDirect::IsGCAvailable() const {
|
||||
return IsGCAvailableLocked();
|
||||
}
|
||||
|
||||
bool WifiDirect::IsGCAvailableLocked() const { return medium_.IsValid(); }
|
||||
bool WifiDirect::IsGCAvailableLocked() const {
|
||||
if (medium_.IsValid()) return medium_.IsInterfaceValid();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool WifiDirect::IsGOStarted() {
|
||||
MutexLock lock(&mutex_);
|
||||
|
||||
Reference in New Issue
Block a user