rpcserver: skip cert create when RPC is disabled

This commit is contained in:
jolan 2017-12-16 09:48:40 -06:00
parent 008e80bf86
commit fd857d5b53

View File

@ -6366,7 +6366,7 @@ func newRPCServer(listenAddrs []string, policy *mining.Policy, s *server) (*rpcS
// Setup TLS if not disabled.
listenFunc := net.Listen
if !cfg.DisableListen && !cfg.DisableTLS {
if !cfg.DisableRPC && !cfg.DisableTLS {
// Generate the TLS cert and key file if both don't already
// exist.
if !fileExists(cfg.RPCKey) && !fileExists(cfg.RPCCert) {