summaryrefslogtreecommitdiffstats
path: root/script/git-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'script/git-daemon')
-rwxr-xr-xscript/git-daemon7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/git-daemon b/script/git-daemon
index fc4c3f1..5cab0ef 100755
--- a/script/git-daemon
+++ b/script/git-daemon
@@ -22,6 +22,12 @@ MAX_CHILDREN = 30
$children_reaped = 0
$children_active = 0
+class GeoIP
+ def close
+ @file.close
+ end
+end
+
module Git
class Daemon
include Daemonize
@@ -117,6 +123,7 @@ module Git
else
geoip = GeoIP.new(File.join(RAILS_ROOT, "data", "GeoIP.dat"))
localization = geoip.country(ip)
+ geoip.close
repository.cloned_from(ip, localization[3], localization[5], 'git')
end