mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-09 17:45:03 +09:00
Add streampool msg size
This commit is contained in:
parent
2989b11f3c
commit
7e9839336c
5 changed files with 41 additions and 5 deletions
|
@ -62,6 +62,10 @@ func (h *HeadUpdate) MsgSize() uint64 {
|
|||
return byteSize + uint64(len(h.Meta.PeerId)) + uint64(len(h.Meta.ObjectId)) + uint64(len(h.Meta.SpaceId))
|
||||
}
|
||||
|
||||
func (h *HeadUpdate) Size() int {
|
||||
return int(h.MsgSize())
|
||||
}
|
||||
|
||||
func (h *HeadUpdate) SetPeerId(peerId string) {
|
||||
h.Meta.PeerId = peerId
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ func (s *syncService) Run(ctx context.Context) (err error) {
|
|||
func (s *syncService) Close(ctx context.Context) (err error) {
|
||||
err = s.receiveQueue.Close()
|
||||
if s.commonMetric != nil {
|
||||
s.commonMetric.UnregisterSyncMetric(s.spaceId, s.metric)
|
||||
s.commonMetric.UnregisterSyncMetric(s.spaceId)
|
||||
}
|
||||
s.manager.Close()
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue