libc: allow dial to be interrupted

previously, if dial was interrupted by an alarm or other note while connecting to a host that resolved to multiple ips, dial would ignore the interruption and try the next host. now dial properly returns with error when it is interrupted.
This commit is contained in:
mischief 2014-11-05 17:24:55 -08:00
parent 0aea317dd2
commit 9f75e55216

View file

@ -114,6 +114,8 @@ csdial(DS *ds)
break; break;
*err = 0; *err = 0;
errstr(err, sizeof err); errstr(err, sizeof err);
if(strcmp(err, "interrupted") == 0)
break;
if(strstr(err, "does not exist") == 0) if(strstr(err, "does not exist") == 0)
strcpy(besterr, err); strcpy(besterr, err);
} }