Skip to content

Commit

Permalink
FIXED 防止并发导致nodeId重复
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0x00 committed Aug 11, 2019
1 parent bc8161e commit 78f3f96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public List<NodePo> getNodeList() {
}

@Override
public NodePo createNode() {
public synchronized NodePo createNode() {
List<NodePo> nodeList = nodeDao.queryNodeList();
NodePo node = new NodePo();
node.setStatus(NodePo.NODE_STATUS_DISCONNECTED);
Expand Down

0 comments on commit 78f3f96

Please sign in to comment.