varnishcache-friends / libvmod-geoip2

Varnish VMOD to query MaxMind GeoIP2 DB files
BSD 2-Clause "Simplified" License
39 stars 17 forks source link

how to close geoip file in vcl_fini #11

Closed dbsdsun closed 8 years ago

dbsdsun commented 8 years ago

in the example, I found

sub vcl_init {
    new country = geoip2.geoip2("GeoLite2-Country.mmdb");
}

I think, the geoip file should be closed in vcl_fini. Could you please show how to close it? thanks

fgsch commented 8 years ago

The file is closed automatically when the reference disappears, e.g. a new VCL is loaded. You don't need to do anything.