mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	更好地支持IPv6
This commit is contained in:
		@@ -214,7 +214,12 @@ func (this *Updater) Loop() error {
 | 
			
		||||
func (this *Updater) loadFile(fp *os.File) error {
 | 
			
		||||
	this.source.LogInfo("load ip library from '" + fp.Name() + "' ...")
 | 
			
		||||
 | 
			
		||||
	fileReader, err := NewFileDataReader(fp, "")
 | 
			
		||||
	var version = ReaderVersionV1
 | 
			
		||||
	if strings.HasSuffix(fp.Name(), ".v2.db") {
 | 
			
		||||
		version = ReaderVersionV2
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	fileReader, err := NewFileDataReader(fp, "", version)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("load ip library from reader failed: %w", err)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user