mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-19 13:18:12 +02:00
fix mutex (#192)
This commit is contained in:
parent
1b24072020
commit
657fc7af1d
1 changed files with 0 additions and 4 deletions
|
|
@ -203,8 +203,6 @@ func (bot *TipBot) acceptInlineReceiveHandler(ctx context.Context, c *tb.Callbac
|
|||
|
||||
func (bot *TipBot) sendInlineReceiveHandler(ctx context.Context, c *tb.Callback) {
|
||||
tx := &InlineReceive{Base: storage.New(storage.ID(c.Data))}
|
||||
mutex.Lock(tx.ID)
|
||||
defer mutex.Unlock(tx.ID)
|
||||
rn, err := tx.Get(tx, bot.Bunt)
|
||||
// immediatelly set intransaction to block duplicate calls
|
||||
if err != nil {
|
||||
|
|
@ -302,8 +300,6 @@ func (bot *TipBot) inlineReceiveEvent(invoiceEvent *InvoiceEvent) {
|
|||
|
||||
func (bot *TipBot) finishInlineReceiveHandler(ctx context.Context, c *tb.Callback) {
|
||||
tx := &InlineReceive{Base: storage.New(storage.ID(c.Data))}
|
||||
mutex.Lock(tx.ID)
|
||||
defer mutex.Unlock(tx.ID)
|
||||
// immediatelly set intransaction to block duplicate calls
|
||||
rn, err := tx.Get(tx, bot.Bunt)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue