}
}
+bool
+Comm::Connection::toGoneCachePeer() const
+{
+ return peer_ && !cbdataReferenceValid(peer_);
+}
+
time_t
Comm::Connection::timeLeft(const time_t idleTimeout) const
{
*/
void setPeer(CachePeer * p);
+ /// whether this is a connection to a cache_peer that was removed during reconfiguration
+ bool toGoneCachePeer() const;
+
/** The time the connection started */
time_t startTime() const {return startTime_;}
if (fd_table[theList_[i]->fd].timeoutHandler == nullptr)
continue;
+ // the cache_peer has been removed from the configuration
+ // TODO: remove all such connections at once during reconfiguration
+ if (theList_[i]->toGoneCachePeer())
+ continue;
+
// finally, a match. pop and return it.
Comm::ConnectionPointer result = theList_[i];
clearHandlers(result);
if (fd_table[theList_[i]->fd].timeoutHandler == nullptr)
continue;
+ // the cache_peer has been removed from the configuration
+ // TODO: remove all such connections at once during reconfiguration
+ if (theList_[i]->toGoneCachePeer())
+ continue;
+
// finally, a match. pop and return it.
Comm::ConnectionPointer result = theList_[i];
clearHandlers(result);