checking sw.isConnected() within discoverOnAllPorts() of OFMLinkDiscovery.