Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
nkorange 2020-03-02 16:47:28 +08:00
commit 043a091445
2 changed files with 7 additions and 4 deletions

View File

@ -101,6 +101,11 @@ Contributors are welcomed to join Nacos project. Please check [CONTRIBUTING](./C
![cwex](https://img.alicdn.com/tfs/TB1bpBlQmrqK1RjSZK9XXXyypXa-830-972.png_288x480q80.jpg)
## Download
- [Github Release](https://github.com/alibaba/nacos/releases)
- [Baidu Netdisk](https://pan.baidu.com/s/1186nmlqPGows9gUZKAx8Zw) Fetch Code : `rest`
## Who is using

View File

@ -317,8 +317,6 @@ public class PushService implements ApplicationContextAware, ApplicationListener
try {
packet = new DatagramPacket(dataBytes, dataBytes.length, client.socketAddr);
Receiver.AckEntry ackEntry = new Receiver.AckEntry(key, packet);
ackEntry.data = data;
// we must store the key be fore send, otherwise there will be a chance the
// ack returns before we put in
ackEntry.data = data;
@ -649,7 +647,7 @@ public class PushService implements ApplicationContextAware, ApplicationListener
try {
udpSocket.receive(packet);
String json = new String(packet.getData(), 0, packet.getLength(), Charset.forName("UTF-8")).trim();
String json = new String(packet.getData(), 0, packet.getLength(), StandardCharsets.UTF_8).trim();
AckPacket ackPacket = JSON.parseObject(json, AckPacket.class);
InetSocketAddress socketAddress = (InetSocketAddress) packet.getSocketAddress();
@ -669,7 +667,7 @@ public class PushService implements ApplicationContextAware, ApplicationListener
long pushCost = System.currentTimeMillis() - udpSendTimeMap.get(ackKey);
Loggers.PUSH.info("received ack: {} from: {}:, cost: {} ms, unacked: {}, total push: {}",
Loggers.PUSH.info("received ack: {} from: {}:{}, cost: {} ms, unacked: {}, total push: {}",
json, ip, port, pushCost, ackMap.size(), totalPush);
pushCostMap.put(ackKey, pushCost);