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
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user