Fix (unlikely) error in Msg13 for spidering if all hosts aer down

This commit is contained in:
Ivan Skytte Jørgensen
2017-02-19 16:20:04 +01:00
parent 092cfe6e25
commit e82156bc67

@ -226,6 +226,13 @@ bool Msg13::forwardRequest ( ) {
if ( ++hostId >= nh ) hostId = 0;
}
if(!h) {
//all spider hosts dead (or misconfiguration)
if(!g_errno)
g_errno = ENOHOSTS;
log("spider: msg13 request: %s",mstrerror(g_errno));
return true;
}
hostId = 0; // HACK!!