title: After switching the tethering mode, Could not connect to the device
body: <p>We are developing an android app which has an option to enable <code>WiFi</code> and connect to any WiFi network as well as enable <code>Tethering</code>. 
  Initially app will on WiFi and connect to one of the WiFi network and list the devices which is connected to this network (Device identification is done by the UDP packets published by the devices, ie beacons). Then we enable Tethering we could not get beacons ie, we could not establish DatagramSocket connection</p>
  
  <p>It shows following error
  <code>SocketException: Machine is not on the network</code></p>