File tree 1 file changed +8
-4
lines changed
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) {
1088
1088
// setHTTP creates the HTTP RPC listener interface string from the set
1089
1089
// command line flags, returning empty if the HTTP endpoint is disabled.
1090
1090
func 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
+ }
1093
1095
if ctx .IsSet (HTTPListenAddrFlag .Name ) {
1094
1096
cfg .HTTPHost = ctx .String (HTTPListenAddrFlag .Name )
1095
1097
}
@@ -1153,8 +1155,10 @@ func setGraphQL(ctx *cli.Context, cfg *node.Config) {
1153
1155
// setWS creates the WebSocket RPC listener interface string from the set
1154
1156
// command line flags, returning empty if the HTTP endpoint is disabled.
1155
1157
func 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
+ }
1158
1162
if ctx .IsSet (WSListenAddrFlag .Name ) {
1159
1163
cfg .WSHost = ctx .String (WSListenAddrFlag .Name )
1160
1164
}
You can’t perform that action at this time.
0 commit comments