From 9f75e55216a1674ba5b27c53dd8dc66e00828be8 Mon Sep 17 00:00:00 2001 From: mischief Date: Wed, 5 Nov 2014 17:24:55 -0800 Subject: 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. --- sys/src/libc/9sys/dial.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/src/libc/9sys/dial.c b/sys/src/libc/9sys/dial.c index 4ac54d46c..2a378f219 100644 --- a/sys/src/libc/9sys/dial.c +++ b/sys/src/libc/9sys/dial.c @@ -114,6 +114,8 @@ csdial(DS *ds) break; *err = 0; errstr(err, sizeof err); + if(strcmp(err, "interrupted") == 0) + break; if(strstr(err, "does not exist") == 0) strcpy(besterr, err); } -- cgit v1.2.3