exit on unexpected error.
retrying connect on error ENETUNREACH or EHOSTUNREACH.
Merge pull request #2 from fujiwara/exit_on_error

exit on unexpected error.