Skip to content

Commit

Permalink
Retry on publisher disabled error
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gr committed Dec 31, 2024
1 parent 7806f1a commit 7050f21
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion winlogbeat/eventlog/errors_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
func IsRecoverable(err error) bool {
return err == win.ERROR_INVALID_HANDLE || err == win.RPC_S_SERVER_UNAVAILABLE ||
err == win.RPC_S_CALL_CANCELLED || err == win.ERROR_EVT_QUERY_RESULT_STALE ||
err == win.ERROR_INVALID_PARAMETER
err == win.ERROR_INVALID_PARAMETER || err == win.ERROR_EVT_PUBLISHER_DISABLED
}

// IsChannelNotFound returns true if the error indicates the channel was not found.
Expand Down
19 changes: 10 additions & 9 deletions winlogbeat/sys/wineventlog/syscall_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ const NilHandle EvtHandle = 0
// Event log error codes.
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
const (
ERROR_INVALID_HANDLE syscall.Errno = 6
ERROR_INVALID_PARAMETER syscall.Errno = 87
ERROR_INSUFFICIENT_BUFFER syscall.Errno = 122
ERROR_NO_MORE_ITEMS syscall.Errno = 259
RPC_S_SERVER_UNAVAILABLE syscall.Errno = 1722
RPC_S_INVALID_BOUND syscall.Errno = 1734
RPC_S_CALL_CANCELLED syscall.Errno = 1818
ERROR_INVALID_OPERATION syscall.Errno = 4317
ERROR_EVT_CHANNEL_NOT_FOUND syscall.Errno = 15007
ERROR_INVALID_HANDLE syscall.Errno = 6
ERROR_INVALID_PARAMETER syscall.Errno = 87
ERROR_INSUFFICIENT_BUFFER syscall.Errno = 122
ERROR_NO_MORE_ITEMS syscall.Errno = 259
RPC_S_SERVER_UNAVAILABLE syscall.Errno = 1722
RPC_S_INVALID_BOUND syscall.Errno = 1734
RPC_S_CALL_CANCELLED syscall.Errno = 1818
ERROR_INVALID_OPERATION syscall.Errno = 4317
ERROR_EVT_CHANNEL_NOT_FOUND syscall.Errno = 15007
ERROR_EVT_PUBLISHER_DISABLED syscall.Errno = 15037
)

// EvtSubscribeFlag defines the possible values that specify when to start subscribing to events.
Expand Down

0 comments on commit 7050f21

Please sign in to comment.