don't hold mutex across net calls
This commit is contained in:
parent
3cfdaacdb3
commit
a5f21922e9
4
honk.go
4
honk.go
|
@ -845,12 +845,14 @@ func gofish(name string) string {
|
|||
return ""
|
||||
}
|
||||
handlock.Lock()
|
||||
defer handlock.Unlock()
|
||||
ref, ok := handfull[name]
|
||||
handlock.Unlock()
|
||||
if ok {
|
||||
return ref
|
||||
}
|
||||
j, err := GetJunk(fmt.Sprintf("https://%s/.well-known/webfinger?resource=acct:%s", m[1], name))
|
||||
handlock.Lock()
|
||||
defer handlock.Unlock()
|
||||
if err != nil {
|
||||
log.Printf("failed to go fish %s: %s", name, err)
|
||||
handfull[name] = ""
|
||||
|
|
Loading…
Reference in New Issue