Skip to content

Commit

Permalink
版本升级到v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
夜色 committed Dec 11, 2016
1 parent 22ddc32 commit 5e6f706
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
LOGGER.info("fast connect success, clientConfig={}, connectedNum={}", clientConfig, connectedNum);
} else if (command == Command.KICK) {
KickUserMessage message = new KickUserMessage(packet, connection);
LOGGER.error("receive kick user userId={}, deviceId={}, message={},", clientConfig.getUserId(), clientConfig.getDeviceId(), message);
LOGGER.error("receive kick user msg userId={}, deviceId={}, message={},", clientConfig.getUserId(), clientConfig.getDeviceId(), message);
ctx.close();
} else if (command == Command.ERROR) {
ErrorMessage errorMessage = new ErrorMessage(packet, connection);
Expand All @@ -116,33 +116,33 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
int receivePushNum = STATISTICS.receivePushNum.incrementAndGet();

PushMessage message = new PushMessage(packet, connection);
LOGGER.info("receive an push message, content={}, receivePushNum={}", new String(message.content, Constants.UTF_8), receivePushNum);
LOGGER.info("receive push message, content={}, receivePushNum={}"
, new String(message.content, Constants.UTF_8), receivePushNum);

if (message.needAck()) {
AckMessage.from(message).sendRaw();
LOGGER.info("send ack success for sessionId={}", message.getSessionId());
}

} else if (command == Command.HEARTBEAT) {
LOGGER.info("receive a heartbeat pong...");
LOGGER.info("receive heartbeat pong...");
} else if (command == Command.OK) {
OkMessage okMessage = new OkMessage(packet, connection);
int bindUserNum = STATISTICS.bindUserNum.get();
if (okMessage.cmd == Command.BIND.cmd) {
bindUserNum = STATISTICS.bindUserNum.incrementAndGet();
}

LOGGER.info("receive an success message={}, bindUserNum={}", okMessage, bindUserNum);
LOGGER.info("receive {}, bindUserNum={}", okMessage, bindUserNum);

} else if (command == Command.HTTP_PROXY) {
HttpResponseMessage message = new HttpResponseMessage(packet, connection);
LOGGER.info("receive a http response, message={}, body={}",
LOGGER.info("receive http response, message={}, body={}",
message, message.body == null ? null : new String(message.body, Constants.UTF_8));
}
}


LOGGER.debug("update currentTime:" + ctx.channel() + "," + msg);
LOGGER.debug("receive package={}, chanel={}", msg, ctx.channel());
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions mpush-test/src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mp.home=${user.dir}/target
mp.log-level=warn
mp.log-level=info
mp.log-conf-path=logback.xml
mp.core.min-heartbeat=10s
mp.core.max-heartbeat=10s
mp.core.min-heartbeat=30s
mp.core.max-heartbeat=30s
mp.core.compress-threshold=10k
mp.zk.server-address="127.0.0.1:2181"
mp.redis {// redis 集群配置
Expand Down

0 comments on commit 5e6f706

Please sign in to comment.