Permalink
Browse files

Move a lastUsed update from lock to unlock

  • Loading branch information...
ziutek committed May 17, 2012
1 parent 1605ae0 commit 6641f183eebddd8c75f7b202a40f6b406d4df6cc
Showing with 1 addition and 1 deletion.
  1. +1 −1 thrsafe/thrsafe.go
View
@@ -28,11 +28,11 @@ type Conn struct {
func (c *Conn) lock() {
//log.Println(c, ":: lock @", c.mutex)
c.mutex.Lock()
- c.lastUsed = time.Now()
}
func (c *Conn) unlock() {
//log.Println(c, ":: unlock @", c.mutex)
+ c.lastUsed = time.Now()
c.mutex.Unlock()
}

0 comments on commit 6641f18

Please sign in to comment.