Skip to content

Interceptors do not block onHalfClose if they block the message #240

@jGleitz

Description

@jGleitz

Both SecurityInterceptor and ValidatingInterceptor can block the onMessage signal of a client if the message is erroneous. However, both interceptors will still pass through the onHalfClose signal that the client issues shortly after the message (for single-message calls). For a downstream instance, this looks like the client never sent a message, but did send a half-close. UnaryServerCallHandler (correctly) throws an error in this scenario. This error is irritating: it happens after the call was already closed and looks like there was a problem with the request, even though it has already completed successfully, from the server’s point of view.

From my point of view, the solution is to block onHalfClose also if onMessage was blocked. From the point of view of a downstream instance, it will then look like the client never send a message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAuto-generates notes

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions