mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 19:02:31 +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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer sess.EndSession(ctx)
|
||||||
_, err = sess.WithTransaction(ctx, func(ctx mongo.SessionContext) (interface{}, error) {
|
_, err = sess.WithTransaction(ctx, func(ctx mongo.SessionContext) (interface{}, error) {
|
||||||
return nil, fn(ctx)
|
return nil, fn(ctx)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user