Skip to content

Commit

Permalink
Delete error persistence slightly later
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 20, 2023
1 parent 5139781 commit 2c1dfbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion user.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,11 @@ func (user *User) Start() error {
)
user.IM.LoginTestConfig = user.bridge.Config.IMessage.LoginTest
cfg := user.AppleRegistration
cfgWasNil := false
if cfg == nil {
cfgWasNil = true
cfg = &ids.Config{}
user.AppleRegistration = cfg
user.bridge.DB.KV.Delete(database.KVHackyNACErrorPersistence)
}
ctx := user.zlog.WithContext(context.TODO())
err := user.IM.Configure(ctx, cfg, false)
Expand All @@ -289,6 +290,9 @@ func (user *User) Start() error {
user.BridgeState.Send(status.BridgeState{StateEvent: status.StateUnknownError, Error: "im-albert-fail"})
return err
}
if cfgWasNil {
user.bridge.DB.KV.Delete(database.KVHackyNACErrorPersistence)
}
go user.IM.Run(user.zlog, nil, nil)

if user.bridge.DB.KV.Get(database.KVLookedForPortals) != "true" {
Expand Down

0 comments on commit 2c1dfbe

Please sign in to comment.