mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-04 03:12:19 +08:00
friend
This commit is contained in:
parent
dbeeb6d2b1
commit
73d404d384
@ -21,6 +21,7 @@ func (m *mongoTx) Transaction(ctx context.Context, fn func(ctx context.Context)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer sess.EndSession(ctx)
|
||||
_, err = sess.WithTransaction(ctx, func(ctx mongo.SessionContext) (interface{}, error) {
|
||||
return nil, fn(ctx)
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user