Skip to content

Commit

Permalink
Recover from panic in dgram handler
Browse files Browse the repository at this point in the history
  • Loading branch information
urso committed Feb 15, 2021
1 parent b959aff commit 5f0b5ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions filebeat/inputsource/common/dgram/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ func (l *Listener) Start() error {
}

func (l *Listener) connectAndRun(ctx context.Context, conn net.PacketConn) error {
defer l.log.Recover("Panic handling datagram")

handler := l.connect(*l.config)
for ctx.Err() == nil {
err := handler(ctx, conn)
Expand Down

0 comments on commit 5f0b5ab

Please sign in to comment.