Skip to content

Commit

Permalink
Manually call close at end of loop
Browse files Browse the repository at this point in the history
ran into too many open files error
  • Loading branch information
Stevenson Jean-Pierre committed May 25, 2015
1 parent 2839358 commit 639a0b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,12 @@ func main() {
if err != nil {
log.Fatal("Error establishing StatsD connection", err)
}
defer DogStatsD.Conn.Close()

chartProcessed(&PassengerStatusData, DogStatsD)
chartMemory(&PassengerStatusData, DogStatsD)
chartPendingRequest(&PassengerStatusData, DogStatsD)
chartPoolUse(&PassengerStatusData, DogStatsD)
chartProcessUptime(&PassengerStatusData, DogStatsD)
DogStatsD.Conn.Close()
time.Sleep(10 * time.Second)
}
}

0 comments on commit 639a0b4

Please sign in to comment.