From 781f118c18dc0e27dadecb3dae66bd4a81cd5cfc Mon Sep 17 00:00:00 2001 From: black-desk Date: Fri, 1 Mar 2024 13:32:23 +0800 Subject: [PATCH] fix: adjust events buffer size to 1024 Signed-off-by: black-desk --- pkg/cgfsmon/new.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cgfsmon/new.go b/pkg/cgfsmon/new.go index ffa318c..e9064c4 100644 --- a/pkg/cgfsmon/new.go +++ b/pkg/cgfsmon/new.go @@ -28,7 +28,7 @@ func New(opts ...Opt) (ret *CGroupFSMonitor, err error) { // github.com/rjeczalik/notify drop events if receiver is too slow. // https://github.com/rjeczalik/notify/issues/85 // https://github.com/rjeczalik/notify/issues/98 - w.eventsIn = make(chan notify.EventInfo, 20) + w.eventsIn = make(chan notify.EventInfo, 1024) for i := range opts { w, err = opts[i](w)