Skip to content
Snippets Groups Projects
Commit 63d29af2 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Don't call the unlock and external lookup callback in defers, instead call them inline

parent 0f522bb2
No related branches found
No related tags found
3 merge requests!233Modify restore to call user-defined bindings callback. Add Sent requests to...,!231Revert "Update store to print changes to the partners list",!192Hotfix/improved restore
......@@ -232,12 +232,12 @@ func LookupContact(userID *id.ID, udManager *ud.Manager,
var result *contact.Contact
var err error
lookupCB := func(c contact.Contact, myErr error) {
defer waiter.Unlock()
defer extLookupCB(c, myErr)
if myErr != nil {
err = myErr
}
result = &c
waiter.Unlock()
extLookupCB(c, myErr)
}
// Take lock once to make sure I will wait
waiter.Lock()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment