mavris / MMLanScan

An iOS LAN Network Scanner library
MIT License
490 stars 121 forks source link

A device connect with WiFi and scan, Disconnect device and again scan, disconnected device still coming in Scan device list #26

Closed sushilkmishra closed 7 years ago

mavris commented 7 years ago

Hi, That's expected behaviour. Traditional Net Scans works like this: 1) Ping host 2) Check if host exist in ARP table. 3) Whatever exists in ARP table we consider it as "online". That way we can detect hosts that they forbid us to ping them. So in your case you get your device as "online" because it's entry is in the ARP table from the previous scan. A nice solution would be to "reset" the ARP table each time but access to that API is limited so we can do anything about it.