Skip to content

Commit 0ca28e9

Browse files
committed
*: Do not stop timers and tickers
With Go 1.23 which is min required since 720281b, `Stop` is no longer required to be called for `Timer`/`Ticker` resource collecting. Closes ##979. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
1 parent 720281b commit 0ca28e9

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

api/max_clients.go

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func (m *maxClients) Handle(f http.HandlerFunc) http.HandlerFunc {
4343
}
4444

4545
deadline := time.NewTimer(m.timeout)
46-
defer deadline.Stop()
4746

4847
select {
4948
case m.pool <- struct{}{}:

internal/neofs/epoch.go

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ func (g *PeriodicGetter) update(ctx context.Context) {
5858
for {
5959
select {
6060
case <-ctx.Done():
61-
tm.Stop()
6261
return
6362
case <-tm.C:
6463
ni, err := g.netGetter.NetworkInfo(ctx, client.PrmNetworkInfo{})

0 commit comments

Comments
 (0)