Skip to content

Commit

Permalink
#502 fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nkorange committed Mar 5, 2019
1 parent a4155fd commit 349ea92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -19,6 +19,7 @@
import com.alibaba.nacos.naming.misc.GlobalExecutor;
import com.alibaba.nacos.naming.misc.Loggers;
import com.alibaba.nacos.naming.misc.NetUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

Expand Down Expand Up @@ -94,7 +95,8 @@ public void run() {
String key = queue.poll(partitionConfig.getTaskDispatchPeriod(),
TimeUnit.MILLISECONDS);

if (dataSyncer.getServers() == null || dataSyncer.getServers().isEmpty()) {
if (StringUtils.isBlank(key) || dataSyncer.getServers() == null ||
dataSyncer.getServers().isEmpty()) {
continue;
}

Expand Down
Expand Up @@ -16,6 +16,7 @@
package com.alibaba.nacos.naming.core;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.nacos.naming.misc.Loggers;
import com.alibaba.nacos.naming.pojo.Record;
import org.apache.commons.lang3.RandomStringUtils;
Expand Down Expand Up @@ -55,6 +56,7 @@ public String toString() {
}

@Override
@JSONField(serialize = false)
public String getChecksum() {
recalculateChecksum();
return cachedChecksum;
Expand Down

0 comments on commit 349ea92

Please sign in to comment.