Retry connecting once

Program now tries to reconnect to a nonexistent process once, in
accordance with the assignment.