Fix concurrency problem when receive ResetFrame and HeadFrame (#13062)

This commit is contained in:
TomlongTK 2023-09-20 10:19:16 +08:00 committed by GitHub
parent edaaa16121
commit 2697652e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ public abstract class AbstractServerCall implements ServerCall, ServerStream.Lis
@Override
public final void onCancelByRemote(TriRpcStatus status) {
closed = true;
if (listener == null) {
return;
}
cancellationContext.cancel(status.cause);
listener.onCancel(status);
}