diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-03-04 12:31:26 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-03-04 12:31:26 -0800 |
| commit | f5cc96f289a986bc68df9097331c353c7f8545a8 (patch) | |
| tree | 0e338bd36d80be78e8fa100b49be1f3c5f388023 | |
| parent | 280c10ec8fabca5b8f3c4e493095501bd9ba046f (diff) | |
| download | seaweedfs-f5cc96f289a986bc68df9097331c353c7f8545a8.tar.xz seaweedfs-f5cc96f289a986bc68df9097331c353c7f8545a8.zip | |
skip checking master peers if not starting master
| -rw-r--r-- | weed/command/server.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/weed/command/server.go b/weed/command/server.go index 611578953..370ebdd46 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -156,9 +156,11 @@ func runServer(cmd *Command, args []string) bool { *isStartingFiler = true } - _, peerList := checkPeers(*serverIp, *masterOptions.port, *masterOptions.peers) - peers := strings.Join(peerList, ",") - masterOptions.peers = &peers + if *isStartingMasterServer { + _, peerList := checkPeers(*serverIp, *masterOptions.port, *masterOptions.peers) + peers := strings.Join(peerList, ",") + masterOptions.peers = &peers + } // ip address masterOptions.ip = serverIp |
