smb: use atomic types

This commit is contained in:
Roberto Ricci
2023-08-18 16:38:19 +02:00
committed by Nick Craig-Wood
parent 28ceb323ee
commit 123a030441
2 changed files with 5 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import (
"path"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/rclone/rclone/fs"
@@ -140,7 +141,7 @@ type Fs struct {
features *fs.Features // optional features
pacer *fs.Pacer // pacer for operations
sessions int32
sessions atomic.Int32
poolMu sync.Mutex
pool []*conn
drain *time.Timer // used to drain the pool when we stop using the connections