Skip to content

ShuttingDownWithError is logged as an error when shutting down during a reconnect attempt #28

@ghelyar

Description

@ghelyar

When FbWebSocket is reconnecting and FbClient.CloseAsync is called, e.g. when FbClientHostedService is stopped during service shut down, ShuttingDownWithError is logged as an error.

This happens after it has already been logged by ReconnectingStoppedDuringRetryDelay (info) or ReconnectingStoppedDuringReconnectAttempt (warning).

It seems like if it was shutting down gracefully, it should not log an error about what it was in the middle of doing at the time, as it's not really terminating with an error, it has been stopped by the caller.

We sometimes get a spike of errors in our logs when we deploy a new version of a service and the old replicas get shut down.

Would it be possible to avoid logging this error in these cases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions