diff options
Diffstat (limited to 'internal/federation/federatingdb/lock.go')
-rw-r--r-- | internal/federation/federatingdb/lock.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/federation/federatingdb/lock.go b/internal/federation/federatingdb/lock.go index 900a282af..5353aea91 100644 --- a/internal/federation/federatingdb/lock.go +++ b/internal/federation/federatingdb/lock.go @@ -19,7 +19,6 @@ package federatingdb import ( "context" - "errors" "net/url" ) @@ -35,9 +34,5 @@ import ( // // Used to ensure race conditions in multiple requests do not occur. func (f *federatingDB) Lock(c context.Context, id *url.URL) (func(), error) { - if id == nil { - return nil, errors.New("Lock: id was nil") - } - unlock := f.locks.Lock(id.String()) - return unlock, nil + return f.state.FedLocks.Lock("federatingDB " + id.String()), nil // id should NEVER be nil. } |