this fixes the assert seen by Tsantilas Christos. It's not really a proper
fix to the underlying problem, but at least makes Squid surive.
The actual problem is race windows introduced by the async call queue. In
this case both "closed by remote server" and "timeout" events may get queued
at the same time, or to be specific the "closed by remote server" read event
stays in the queue and gets called even after pconn has deregistered interest
in the event.
IdleConnList::removeFD(int fd)
{
int index = findFDIndex(fd);
- assert(index >= 0);
+ if (index < 0) {
+ debugs(48, 0, "IdleConnList::removeFD: FD " << fd << " NOT FOUND!");
+ return;
+ }
debugs(48, 3, "IdleConnList::removeFD: found FD " << fd << " at index " << index);
for (; index < nfds - 1; index++)