Goit

Simple and lightweight Git web server
Mirror of https://github.com/Jamozed/Goit
git clone http://git.omkov.net/Goit
Log | Tree | Refs | README | Download

AuthorJakob Wakeling <[email protected]>
Date2023-12-18 11:45:39
Commitdabb96760f77cd64b2c2e9dceca979c7383c2a4b
Parentf9225e63fa53bce959354967a75f043941f54395

Fix diffstat cache mutex lockup

Diffstat

M src/goit/git.go | 2 ++

1 files changed, 2 insertions, 0 deletions

diff --git a/src/goit/git.go b/src/goit/git.go
index 7e0c35c..6172fe9 100644
--- a/src/goit/git.go
+++ b/src/goit/git.go
@@ -234,6 +234,7 @@ var diffsLock sync.RWMutex
 func DiffStats(c *object.Commit) ([]DiffStat, error) {
 	diffsLock.RLock()
 	if stats, ok := diffs[c.Hash]; ok {
+		diffsLock.RUnlock()
 		return stats, nil
 	}
 	diffsLock.RUnlock()