File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1088,8 +1088,10 @@ func SplitAndTrim(input string) (ret []string) {
10881088// setHTTP creates the HTTP RPC listener interface string from the set
10891089// command line flags, returning empty if the HTTP endpoint is disabled.
10901090func setHTTP (ctx * cli.Context , cfg * node.Config ) {
1091- if ctx .Bool (HTTPEnabledFlag .Name ) && cfg .HTTPHost == "" {
1092- cfg .HTTPHost = "127.0.0.1"
1091+ if ctx .Bool (HTTPEnabledFlag .Name ) {
1092+ if cfg .HTTPHost == "" {
1093+ cfg .HTTPHost = "127.0.0.1"
1094+ }
10931095 if ctx .IsSet (HTTPListenAddrFlag .Name ) {
10941096 cfg .HTTPHost = ctx .String (HTTPListenAddrFlag .Name )
10951097 }
@@ -1153,8 +1155,10 @@ func setGraphQL(ctx *cli.Context, cfg *node.Config) {
11531155// setWS creates the WebSocket RPC listener interface string from the set
11541156// command line flags, returning empty if the HTTP endpoint is disabled.
11551157func setWS (ctx * cli.Context , cfg * node.Config ) {
1156- if ctx .Bool (WSEnabledFlag .Name ) && cfg .WSHost == "" {
1157- cfg .WSHost = "127.0.0.1"
1158+ if ctx .Bool (WSEnabledFlag .Name ) {
1159+ if cfg .WSHost == "" {
1160+ cfg .WSHost = "127.0.0.1"
1161+ }
11581162 if ctx .IsSet (WSListenAddrFlag .Name ) {
11591163 cfg .WSHost = ctx .String (WSListenAddrFlag .Name )
11601164 }
You can’t perform that action at this time.
0 commit comments