From b962f49c9097eb6f7b34e4b846ba2467e4cd0e79 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 18 Jul 2014 19:37:13 -0400 Subject: [PATCH] Add Close to Conn interface --- tracker/conn.go | 2 ++ tracker/memory/conn.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tracker/conn.go b/tracker/conn.go index e8f3d59..dd83cc2 100644 --- a/tracker/conn.go +++ b/tracker/conn.go @@ -68,6 +68,8 @@ type Pool interface { // Conn represents a connection to the data store that can be used // to make reads/writes. type Conn interface { + Close() error + // Torrent interactions FindTorrent(infohash string) (*models.Torrent, error) PutTorrent(t *models.Torrent) error diff --git a/tracker/memory/conn.go b/tracker/memory/conn.go index 340ce7f..bfe59d7 100644 --- a/tracker/memory/conn.go +++ b/tracker/memory/conn.go @@ -17,6 +17,10 @@ type Conn struct { *Pool } +func (c *Conn) Close() error { + return nil +} + func (c *Conn) FindUser(passkey string) (*models.User, error) { c.usersM.RLock() defer c.usersM.RUnlock()