@chetankothari 
sending to server and waiting for server response should happen in retry loop