Skip to content

Commit

Permalink
fix bug: location dict reload timer
Browse files Browse the repository at this point in the history
  • Loading branch information
wenweihu86 committed Oct 28, 2017
1 parent f0843b1 commit b2a2d7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adserver/location_dict.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ func (locationDict *IpDict) StartReloadTimer() {
if blockCurrentModifiedTime > locationDict.BlockLastModifiedTime || locationCurrentModifiedTime > locationDict.LocationLastModifiedTime {
AdServerLog.Info(fmt.Sprintf("start reload ad info dict at %s",
t1.Format("2006-01-02 03:04:05")))
_, err := LoadLocationDict(
ipDataInfo, err := LoadLocationDict(
GlobalConfObject.GeoBlockFileName,
GlobalConfObject.GeoLocationFileName)
if err != nil {
continue
}
nextIndex := 1 - locationDict.CurrentIndex
locationDict.IpDataArray[nextIndex] = ipDataInfo
locationDict.CurrentIndex = nextIndex
locationDict.BlockLastModifiedTime = blockCurrentModifiedTime
locationDict.LocationLastModifiedTime = locationCurrentModifiedTime
Expand Down

0 comments on commit b2a2d7e

Please sign in to comment.