summaryrefslogtreecommitdiff
path: root/sys/src/cmd/webfs/http.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-05-16 17:00:19 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-05-16 17:00:19 +0200
commit4c16111e66763cf0b427082c4132b53e050d4ba2 (patch)
tree27904493de5cf7121354583fe859a2199ff058c5 /sys/src/cmd/webfs/http.c
parent595f9c4a09bedffab4d7f6dc95c7c7c2720412cb (diff)
webfs: add global timeout parameter settable in rootctl and command line
Diffstat (limited to 'sys/src/cmd/webfs/http.c')
-rw-r--r--sys/src/cmd/webfs/http.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/src/cmd/webfs/http.c b/sys/src/cmd/webfs/http.c
index 7ed7d5cc7..423aab124 100644
--- a/sys/src/cmd/webfs/http.c
+++ b/sys/src/cmd/webfs/http.c
@@ -542,9 +542,8 @@ http(char *m, Url *u, Key *shdr, Buq *qbody, Buq *qpost)
qunlock(qpost);
}
- /* give 10 seconds to dial */
if(h == nil){
- alarm(10000);
+ alarm(timeout);
if((h = hdial(proxy ? proxy : u)) == nil)
break;
}
@@ -619,10 +618,8 @@ http(char *m, Url *u, Key *shdr, Buq *qbody, Buq *qpost)
}
/* no timeout when posting */
alarm(0);
- } else {
- /* wait 20 seconds for the response */
- alarm(20000);
- }
+ } else
+ alarm(timeout);
Cont:
rhdr = 0;