fix lldb status checking
diff --git a/ios-deploy.c b/ios-deploy.c
index 75b083a..efdca28 100644
--- a/ios-deploy.c
+++ b/ios-deploy.c
@@ -77,7 +77,7 @@
     listener = lldb.target.GetDebugger().GetListener()\n\
     listener.StartListeningForEvents(process.GetBroadcaster(), lldb.SBProcess.eBroadcastBitStateChanged)\n\
     events = []\n\
-    state = lldb.eStateInvalid\n\
+    state = (process.GetState() or lldb.eStateInvalid)\n\
     while state != lldb.eStateConnected:\n\
         event = lldb.SBEvent()\n\
         if listener.WaitForEvent(1, event):\n\