Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Wizzercn committed Jul 31, 2018
1 parent 3ec187b commit 0e9ee44
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public class MessageIdService implements IMessageIdService {
@Override
public int getNextMessageId() {
try {
nextMsgId = (int) (redisService.incr("mqttwk:messageid:num") % 65535);
nextMsgId = (int) (redisService.incr("mqttwk:messageid:num") % 65536);
if (nextMsgId == 0)
return this.getNextMessageId();
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 0e9ee44

Please sign in to comment.