summaryrefslogtreecommitdiff
path: root/src/htsparse.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-07-18 20:08:38 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-07-18 20:08:38 +0000
commit6516c4f306f7772e81e9c906924e97295cb89a89 (patch)
treec380d95a5a70e80bbee95546ea77d3b5c7760a76 /src/htsparse.c
parent818001ba76b3b9deae956e213ffdf1206fe02635 (diff)
Fixed buggy keep-alive handling, leading to waste connections
Diffstat (limited to 'src/htsparse.c')
-rw-r--r--src/htsparse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/htsparse.c b/src/htsparse.c
index fd60a1e..02e4e3a 100644
--- a/src/htsparse.c
+++ b/src/htsparse.c
@@ -4652,7 +4652,7 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
/* We added the link before the parser recorded it -- the background download MUST NOT clean silently this entry! (Petr Gajdusek) */
back[b].early_add = 1;
- /* Cache read failed because file does not exists (bad delayed name!)
+ /* Cache read failed because file does not exist (bad delayed name!)
Just re-add with the correct name, as we know the MIME now!
*/
if (back[b].r.statuscode == STATUSCODE_INVALID && back[b].r.adr == NULL) {
@@ -4664,7 +4664,8 @@ int hts_wait_delayed(htsmoduleStruct * str, char *adr, char *fil, char *save,
back_copy_static(&back[b], &delayed_back);
/* Delete entry */
- back_delete(opt, cache, sback, b); // cancel
+ back[b].r.statuscode = 0; /* TEMPORARY INVESTIGATE WHY WE FETCHED A SOCKET HERE */
+ back_maydelete(opt, cache, sback, b); // cancel
b = -1;
/* Recompute filename with MIME type */