Skip to content

Commit 06e3336

Browse files
committed
add missing lock to stats
1 parent c35053f commit 06e3336

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clamd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ func (c *Clamd) ScanAll(ctx context.Context, src string) (bool, error) {
333333
}
334334

335335
func (c *Clamd) Stats(ctx context.Context) (*Stats, error) {
336+
c.l()
337+
defer c.ul()
338+
336339
res, err := c.writeCmdReadData(ctx, "STATS")
337340
if err != nil {
338341
return nil, err

0 commit comments

Comments
 (0)