diff --git a/pkg/exchange/binance/depthframe.go b/pkg/exchange/binance/depthframe.go index 3a67579b6..42f7cb8b1 100644 --- a/pkg/exchange/binance/depthframe.go +++ b/pkg/exchange/binance/depthframe.go @@ -24,7 +24,7 @@ type DepthFrame struct { pushCallbacks []func(e DepthEvent) } -func (f *DepthFrame) Reset() { +func (f *DepthFrame) reset() { f.mu.Lock() f.SnapshotDepth = nil f.BufEvents = nil diff --git a/pkg/exchange/binance/stream.go b/pkg/exchange/binance/stream.go index 77c4b5864..bcf8db377 100644 --- a/pkg/exchange/binance/stream.go +++ b/pkg/exchange/binance/stream.go @@ -175,7 +175,7 @@ func NewStream(client *binance.Client) *Stream { stream.OnConnect(func() { // reset the previous frames for _, f := range stream.depthFrames { - f.Reset() + f.reset() f.loadDepthSnapshot() }