Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

类UPushClient是不是有bug #8

Open
csoftware opened this issue Jun 17, 2021 · 0 comments
Open

类UPushClient是不是有bug #8

csoftware opened this issue Jun 17, 2021 · 0 comments

Comments

@csoftware
Copy link

  1. bug之处

       @Override
       public Future<Boolean> push(PushContext context) {
           if (!connection.getSessionContext().handshakeOk()) {
               logger.warn("connection is not handshake ok!");
               return null;
           }
           PushMessage message = new PushMessage(context.getContext(), connection);
           message.addFlag(context.ackModel.flag);
           message.send();
           logger.debug("<<< send push,Packet=%s, message=%s",message.getPacket(), message);
           return ackRequestMgr.add(message.getSessionId(), context);
       }
    
  2. bug修复,调式发现服务端的ack返回早于message.send()

       @Override
       public Future<Boolean> push(PushContext context) {
           if (!connection.getSessionContext().handshakeOk()) {
               logger.warn("connection is not handshake ok!");
               return null;
           }
           PushMessage message = new PushMessage(context.getContext(), connection);
           message.addFlag(context.ackModel.flag);
           Future<Boolean> task = ackRequestMgr.add(message.getSessionId(), context);
           message.send();
           logger.debug("<<< send push,Packet=%s, message=%s",message.getPacket(), message);
           return task;
       }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant