Skip to content

Commit

Permalink
Improve write
Browse files Browse the repository at this point in the history
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
  • Loading branch information
nodece committed Jan 12, 2023
1 parent 357035f commit 631cd02
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,7 @@ private CompletableFuture<Void> doAuthenticationAsync(AuthData clientData, int c
}
} else {
// auth not complete, continue auth with client side.
ctx.writeAndFlush(
Commands.newAuthChallenge(authMethod, nextAuthData, clientProtocolVersion));
writeAndFlush(Commands.newAuthChallenge(authMethod, nextAuthData, clientProtocolVersion));
if (log.isDebugEnabled()) {
log.debug("[{}] Authentication in progress client by method {}, using original auth state: {}",
remoteAddress, authMethod, useOriginalAuthState);
Expand Down Expand Up @@ -3184,7 +3183,7 @@ private void closeWithAuthException(String operation, Throwable e) {
Throwable unwrapEx = FutureUtil.unwrapCompletionException(e);
service.getPulsarStats().recordConnectionCreateFail();
logAuthException(remoteAddress, operation, getPrincipal(), Optional.empty(), unwrapEx);
ctx.writeAndFlush(Commands.newError(-1, ServerError.AuthenticationError, unwrapEx.getMessage()));
writeAndFlush(Commands.newError(-1, ServerError.AuthenticationError, unwrapEx.getMessage()));
close();
}

Expand Down

0 comments on commit 631cd02

Please sign in to comment.