Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

feat(security): handle challenge from server #138

Merged
merged 29 commits into from
Nov 27, 2020

Conversation

levy5307
Copy link
Contributor

No description provided.

@levy5307 levy5307 marked this pull request as draft September 24, 2020 09:42
@levy5307 levy5307 marked this pull request as ready for review November 25, 2020 03:27
neverchanje
neverchanje previously approved these changes Nov 25, 2020
Comment on lines 388 to 404
public void setAuthSucceed() {
Queue<RequestEntry> swappedPendingSend = new LinkedList<>();
synchronized (authPendingSend) {
authSucceed = true;
swappedPendingSend.addAll(authPendingSend);
authPendingSend.clear();
}

while (!swappedPendingSend.isEmpty()) {
RequestEntry e = swappedPendingSend.poll();
if (pendingResponse.get(e.sequenceId) != null) {
write(e, fields);
} else {
logger.info("{}: {} is removed from pending, perhaps timeout", name(), e.sequenceId);
}
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I told you, your auth code is intrusive to replica session, again...

Copy link
Contributor Author

@levy5307 levy5307 Nov 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it's the same thing with we talk, which I add a authPendingSendin ReplicaSession. We can refactor it in the later.

@neverchanje neverchanje merged commit befbf8b into XiaoMi:master Nov 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants