Skip to content

Commit 25cdfc5

Browse files
committed
Remove excessive locking
1 parent 6278ade commit 25cdfc5

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

cmd/hsc/api.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,6 @@ func (api *portalAPI) ServeHTTP(w http.ResponseWriter, r *http.Request) {
332332
return
333333
}*/
334334

335-
api.mu.RLock()
336-
defer api.mu.RUnlock()
337335
api.router.ServeHTTP(w, r)
338336
}
339337

cmd/hsc/database.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,6 @@ outer:
18981898
if len(countries) > 0 {
18991899
var c string
19001900
if err := stmt.QueryRow(network, host.PublicKey[:]).Scan(&c); err != nil {
1901-
api.mu.RUnlock()
19021901
return nil, utils.AddContext(err, "couldn't retrieve country")
19031902
}
19041903
if _, ok := allCountries[strings.ToLower(c)]; !ok {

0 commit comments

Comments
 (0)