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:
parent
0aea317dd2
commit
9f75e55216
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue