diff --git a/mobly/mesh-run/public_mesh_test.py b/mobly/mesh-run/public_mesh_test.py
index 3579fe2645c85d50a853e3531ab94e485aaf5446..de0cac8fa4235498d60890e7ce5e4fac2ac7e258 100644
--- a/mobly/mesh-run/public_mesh_test.py
+++ b/mobly/mesh-run/public_mesh_test.py
@@ -20,7 +20,15 @@ class PublicMeshTest(base_test.BaseTestClass):
     self.droid2.pm.startActivity()
     self.droid1.pm.startAdvertising()
     self.droid2.pm.startDiscovery()
-    time.sleep(10)
+    with self.droid1.handle_usb_disconnect():
+      with self.droid2.handle_usb_disconnect():
+        maxWaitDisconnect = 10
+        print("waiting for disconnect for", maxWaitDisconnect, "seconds")
+        time.sleep(maxWaitDisconnect)
+        print("wait for device 1")
+        self.droid1.adb.wait_for_device()
+        print("wait for device 2")
+        self.droid2.adb.wait_for_device()
 
 if __name__ == '__main__':
   test_runner.main()