diff --git a/NearbyShare/NearbyConnectionManager.swift b/NearbyShare/NearbyConnectionManager.swift index 932cf84..1e1ef8d 100644 --- a/NearbyShare/NearbyConnectionManager.swift +++ b/NearbyShare/NearbyConnectionManager.swift @@ -387,7 +387,7 @@ public class NearbyConnectionManager : NSObject, NetServiceDelegate, InboundNear outgoingTransfers.removeValue(forKey: connection.id) } - public func getActiveConnections() -> Int { + public func getActiveConnectionsCount() -> Int { return activeConnections.count } } diff --git a/NearbyShare/SleepManager.swift b/NearbyShare/SleepManager.swift index b0bff95..47bf689 100644 --- a/NearbyShare/SleepManager.swift +++ b/NearbyShare/SleepManager.swift @@ -27,7 +27,7 @@ class SleepManager{ } public func enableSleep(){ - if(assertionID == 0 || NearbyConnectionManager.shared.getActiveConnections() != 0){ + if(assertionID == 0 || NearbyConnectionManager.shared.getActiveConnectionsCount() != 0){ return }