ConnectionKillOne() _can_ return -1 as an indication of error
This is T. Bharath's fix
This commit is contained in:
parent
07de3c9df0
commit
bec97a0999
12
lib/url.c
12
lib/url.c
@ -1097,10 +1097,14 @@ ConnectionStore(struct SessionHandle *data,
|
|||||||
infof(data, "Connection (#%d) was killed to make room\n", i);
|
infof(data, "Connection (#%d) was killed to make room\n", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
data->state.connects[i] = conn; /* fill in this */
|
if(-1 != i) {
|
||||||
conn->connectindex = i; /* make the child know where the pointer to this
|
/* only do this if a true index was returned, if -1 was returned there
|
||||||
particular data is stored */
|
is no room in the cache for an unknown reason and we cannot store
|
||||||
|
this there. */
|
||||||
|
data->state.connects[i] = conn; /* fill in this */
|
||||||
|
conn->connectindex = i; /* make the child know where the pointer to this
|
||||||
|
particular data is stored */
|
||||||
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user