Skip to content

Commit

Permalink
Merge pull request #1486 from shelomentsevd/main
Browse files Browse the repository at this point in the history
fix(telegram): panic in peers.Manager during updates
  • Loading branch information
ernado authored Dec 10, 2024
2 parents c816a01 + e7f32d5 commit e7e316f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions telegram/peers/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"go.uber.org/zap"
"golang.org/x/sync/singleflight"

"github.com/gotd/td/constant"
"github.com/gotd/td/tg"
)

Expand Down Expand Up @@ -36,5 +37,11 @@ func (o Options) Build(api *tg.Client) *Manager {
me: new(atomicUser),
logger: o.Logger,
sg: singleflight.Group{},
needUpdate: peerIDSet{
m: make(map[constant.TDLibPeerID]struct{}),
},
needUpdateFull: peerIDSet{
m: make(map[constant.TDLibPeerID]struct{}),
},
}
}

0 comments on commit e7e316f

Please sign in to comment.