summaryrefslogtreecommitdiff
path: root/sys/src/cmd/webfs
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-09-19 02:11:03 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-09-19 02:11:03 +0200
commitcbdf48454fece6380a0ad713d53902f65bf9308b (patch)
tree0abdc831b9674e519b4659b95df6d6dcb39b3da8 /sys/src/cmd/webfs
parent6d354d07e81aa94b3798603093dfa26fac2f6488 (diff)
webfs: fix mistake...
Diffstat (limited to 'sys/src/cmd/webfs')
-rw-r--r--sys/src/cmd/webfs/http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/webfs/http.c b/sys/src/cmd/webfs/http.c
index ef53e4e8a..33cec2122 100644
--- a/sys/src/cmd/webfs/http.c
+++ b/sys/src/cmd/webfs/http.c
@@ -100,8 +100,8 @@ hdial(Url *u, int cached)
snprint(addr, sizeof(addr), "tcp!%s!%s", u->host, u->port ? u->port : u->scheme);
+ qlock(&hpool);
if(cached){
- qlock(&hpool);
for(p = nil, h = hpool.head; h; p = h, h = h->next){
if(strcmp(h->addr, addr) == 0){
if(p)
@@ -113,9 +113,9 @@ hdial(Url *u, int cached)
return h;
}
}
- hpool.active++;
- qunlock(&hpool);
}
+ hpool.active++;
+ qunlock(&hpool);
if(debug)
fprint(2, "hdial [%d] %s\n", hpool.active, addr);