use socket timeout as a delay mechanism to avoid busy loop