avoid spinning processor in thread

improve battery life when android client is connected to the server by
adding sleep in the tight networking processing loop