Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrain2012 committed Dec 28, 2021
1 parent d901707 commit d96c201
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,10 @@ public int getSecondPhaseAckPendingMessages(String clientID) {
public ErrorCode kickoffPCClient(String operator, String pcClientId) {
Session session = sessions.get(pcClientId);
if (session != null) {
if(!operator.equals(session.getUsername())) {
LOG.error("kickoffPCClient failure, user {} don't have client {}", operator, pcClientId);
return ErrorCode.ERROR_CODE_NOT_RIGHT;
}
if (session.getPlatform() == ProtoConstants.Platform.Platform_LINUX
|| session.getPlatform() == ProtoConstants.Platform.Platform_Windows
|| session.getPlatform() == ProtoConstants.Platform.Platform_OSX
Expand All @@ -737,8 +741,11 @@ public ErrorCode kickoffPCClient(String operator, String pcClientId) {
sessions.remove(pcClientId);
mServer.getProcessor().kickoffSession(session);
} else {
LOG.error("session {} is not pc client:{}", pcClientId, session.getPlatform());
return ErrorCode.ERROR_CODE_NOT_RIGHT;
}
} else {
LOG.error("Can't find the session for client <{}>", pcClientId);
}
return ErrorCode.ERROR_CODE_SUCCESS;
}
Expand Down

0 comments on commit d96c201

Please sign in to comment.