From 8979c2dd1ed83eea7fc7af9c36513c00c05880aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rudowicz?= Date: Wed, 6 Mar 2024 07:52:28 +0100 Subject: [PATCH] Configurable pooling interval --- satel.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/satel.go b/satel.go index 52892ee..80794cc 100644 --- a/satel.go +++ b/satel.go @@ -21,6 +21,7 @@ type Event struct { type Config struct { EventsQueueSize int LongCommands bool + PoolingInterval time.Duration } type Satel struct { @@ -65,7 +66,7 @@ func NewConfig(conn net.Conn, config Config) *Satel { } s.readRawEvents() } - time.Sleep(5 * time.Second) + time.Sleep(config.PoolingInterval) } }() go func() {