SDK status is an unreliable source of info even when connecting.
Make sure to register both GotIp and onDisconnected and wait for the
events in the wait-loop, checking which one arrived first.
Plus, make sure the connection task object was actually created, before
proceeding with the connect-loop.