1833 Fix syslog udp (#1835)
Lint / lint (push) Waiting to run
Release / Release (push) Waiting to run
Scan for secrets / test (push) Waiting to run
Snifftest / Run Snifftest (push) Waiting to run
Test / test (push) Waiting to run
Test / test-community (push) Waiting to run

* # 1183 - Update syslog UDP listener deadline

* #1833 - Update syslog UDP listener deadline v2

* #1833 - Update syslog UDP listener deadline v3
This commit is contained in:
David
2024-01-08 09:59:48 -08:00
committed by GitHub
parent fd8e5e9df6
commit 24a09bc37d
+4
View File
@@ -303,6 +303,10 @@ func (s *Source) acceptUDPConnections(ctx context.Context, netListener net.Packe
if common.IsDone(ctx) {
return nil
}
err := netListener.SetDeadline(time.Now().Add(time.Second))
if err != nil {
ctx.Logger().V(2).Info("could not update connection deadline", "error", err)
}
input := make([]byte, 65535)
_, remote, err := netListener.ReadFrom(input)
if err != nil {