Browse Source

Close connection in Get method

Michael Crosby 11 years ago
parent
commit
7072d2aaca
1 changed files with 2 additions and 0 deletions
  1. 2 0
      gograph/gograph.go

+ 2 - 0
gograph/gograph.go

@@ -166,6 +166,8 @@ func (db *Database) Get(name string) *Entity {
 	if err != nil {
 		return nil
 	}
+	defer conn.Close()
+
 	e, err := db.get(conn, name)
 	if err != nil {
 		return nil