ref: cbdf48454fece6380a0ad713d53902f65bf9308b
parent: 6d354d07e81aa94b3798603093dfa26fac2f6488
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Sep 18 22:11:03 EDT 2016
webfs: fix mistake...
--- a/sys/src/cmd/webfs/http.c
+++ b/sys/src/cmd/webfs/http.c
@@ -100,8 +100,8 @@
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 @@
return h;
}
}
- hpool.active++;
- qunlock(&hpool);
}
+ hpool.active++;
+ qunlock(&hpool);
if(debug)
fprint(2, "hdial [%d] %s\n", hpool.active, addr);