Remove geoip db loading fallback with binary index
This commit is contained in:
@@ -56,15 +56,8 @@ func (ub *updateBroadcaster) AvailableUpdate() *updates.Artifact {
|
|||||||
// Get artifact.
|
// Get artifact.
|
||||||
artifact, err := module.instance.IntelUpdates().GetFile(ub.dbName)
|
artifact, err := module.instance.IntelUpdates().GetFile(ub.dbName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Check if the geoip database is included in the binary index instead.
|
log.Warningf("geoip: failed to get geoip update: %s", err)
|
||||||
// TODO: Remove when intelhub builds the geoip database.
|
return nil
|
||||||
if artifact2, err2 := module.instance.BinaryUpdates().GetFile(ub.dbName); err2 == nil {
|
|
||||||
artifact = artifact2
|
|
||||||
err = nil
|
|
||||||
} else {
|
|
||||||
log.Warningf("geoip: failed to get geoip update: %s", err)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return artifact if not yet initialized.
|
// Return artifact if not yet initialized.
|
||||||
|
|||||||
Reference in New Issue
Block a user