From 4af813f8a53105c3e232809ba9cbee8e476ee38f Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 22 Nov 2018 14:50:19 -0800 Subject: [PATCH] fix benchmark run error in original mode Signed-off-by: Leo Chen --- benchmark.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/benchmark.go b/benchmark.go index bbce1fd0a..1a99fa2ff 100644 --- a/benchmark.go +++ b/benchmark.go @@ -226,9 +226,11 @@ func main() { }() } } else { - go func() { - currentNode.JoinShard(leader) - }() + if *peerDisvoery { + go func() { + currentNode.JoinShard(leader) + }() + } } currentNode.StartServer(*port)