retry flag added and daemon update.

This is a squash of a couple of commits ported from the inferno hg repo.