better defer that Unlock

This commit is contained in:
Matt Jaffee 2020-04-15 18:20:20 -05:00
parent 38cec6f20e
commit 088e60b830
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF

View file

@ -166,7 +166,7 @@ func (tm *TransactionManager) finish(id string) (Transaction, error) {
// if there isn't one.
func (tm *TransactionManager) Get(id string) (Transaction, error) {
tm.mu.RLock()
tm.mu.RUnlock()
defer tm.mu.RUnlock()
return tm.store.Get(id)
}