Skip to content

Commit f7bb917

Browse files
committed
flush
1 parent dd7e12a commit f7bb917

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

analytics.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ func (a *AnalyticsProcessor) start(ctx context.Context, tickerInterval int) {
5353
slog.Int("status", resp.StatusCode),
5454
slog.String("url", resp.Request.URL.String()),
5555
)
56-
return
5756
}
58-
a.store.data = make(map[string]int)
5957
case <-ctx.Done():
6058
return
6159
}
@@ -75,6 +73,7 @@ func (a *AnalyticsProcessor) Flush(ctx context.Context) (*http.Response, error)
7573
if resp.IsError() {
7674
return resp.RawResponse, fmt.Errorf("AnalyticsProcessor.Flush received error response %s", resp.Status())
7775
}
76+
a.store.data = make(map[string]int)
7877
return resp.RawResponse, nil
7978
}
8079

0 commit comments

Comments
 (0)