Browse Source

Close connection in Get method

Michael Crosby 11 năm trước cách đây
mục cha
commit
7072d2aaca
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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