Fix up case where subscription is terminated due to ACLs changing or a snapshot restore occurring

pull/17566/head
Andrew Stucki 2023-06-05 11:49:30 -04:00
parent 88951bfafa
commit 82e7d4fe18
1 changed files with 6 additions and 0 deletions

View File

@ -141,6 +141,12 @@ func newUpdateEvent(correlationID string, result any, err error) proxycfg.Update
if acl.IsErrNotFound(err) {
err = proxycfg.TerminalError(err)
}
// these are also errors where we should mark them
// as terminal for the sake of proxycfg, since they require
// a resubscribe.
if err == stream.ErrSubForceClosed || err == stream.ErrShuttingDown {
err = proxycfg.TerminalError(err)
}
return proxycfg.UpdateEvent{
CorrelationID: correlationID,
Result: result,