aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar alecdwm 2015-12-04 09:43:21 +1000
committerGravatar alecdwm 2015-12-04 09:43:59 +1000
commitbbeaf040d688772e37114c06189fc61fe5a314aa (patch)
treea475398378c538f5a159b87143e72186c572cf16
parente4d698fda11a4a20644d7ea78dc7cc4ecb027ae8 (diff)
Fix for socket: too many open files
-rw-r--r--lib/github.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/github.go b/lib/github.go
index 5ca924e..fb286cc 100644
--- a/lib/github.go
+++ b/lib/github.go
@@ -61,6 +61,7 @@ func getGitHubUserData(username string) GitHubUserData {
"https://api.github.com/users/%s",
username))
handleError("Fetching GitHub user data", err)
+ defer response.Body.Close()
// Decode
var githubUserData GitHubUserData
@@ -81,6 +82,7 @@ func getGitHubUserRepos(username string) []GitHubUserRepo {
"https://api.github.com/users/%s/repos",
username))
handleError("Fetching GitHub user repos", err)
+ defer response.Body.Close()
// Decode
var githubUserRepos []GitHubUserRepo