Skip to content

Commit

Permalink
deferred db connection close
Browse files Browse the repository at this point in the history
  • Loading branch information
ronniedada committed May 16, 2013
1 parent c8d5e45 commit f64ec8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ func main() {
log.Printf("Error connecting to couchbase server: %v", err)
}

defer db.Close()

log.Printf("Listening on %v", *addr)
log.Fatal(http.ListenAndServe(*addr, nil))
}

0 comments on commit f64ec8b

Please sign in to comment.