mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
staticaddr: avoid startup SendEvent data races
This commit is contained in:
parent
a9977dd5f4
commit
f80aee4dae
2 changed files with 4 additions and 4 deletions
|
|
@ -208,7 +208,7 @@ func (m *Manager) recoverDeposits(ctx context.Context) error {
|
|||
go func(fsm *FSM) {
|
||||
err := fsm.SendEvent(ctx, OnRecover, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnStart event: %v",
|
||||
log.Errorf("Error sending OnRecover event: %v",
|
||||
err)
|
||||
}
|
||||
}(fsm)
|
||||
|
|
@ -393,7 +393,7 @@ func (m *Manager) startDepositFsm(ctx context.Context, deposit *Deposit) error {
|
|||
|
||||
// Send the start event to the state machine.
|
||||
go func() {
|
||||
err = fsm.SendEvent(ctx, OnStart, nil)
|
||||
err := fsm.SendEvent(ctx, OnStart, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnStart event: %v", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -809,9 +809,9 @@ func (m *Manager) startLoopInFsm(ctx context.Context,
|
|||
|
||||
// Send the start event to the state machine.
|
||||
go func() {
|
||||
err = loopInFsm.SendEvent(ctx, OnInitHtlc, nil)
|
||||
err := loopInFsm.SendEvent(ctx, OnInitHtlc, nil)
|
||||
if err != nil {
|
||||
log.Errorf("Error sending OnNewRequest event: %v", err)
|
||||
log.Errorf("Error sending OnInitHtlc event: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue