diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-05-10 04:04:40 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2016-05-10 04:04:40 +0800 |
commit | 8f96d66241a7585a12a56f28352cb64951abc559 (patch) | |
tree | d649e6004e1292a59e54f40b163ea7c03ea35c5e /node/api.go | |
parent | 4b9de756236b58fab1df2e467fd4f6d85ea9aebb (diff) | |
parent | 5782164a35ea8acdb09507a604c45941051fd5f3 (diff) | |
download | go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.tar go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.tar.gz go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.tar.bz2 go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.tar.lz go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.tar.xz go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.tar.zst go-tangerine-8f96d66241a7585a12a56f28352cb64951abc559.zip |
Merge branch 'develop' into release/1.4
Diffstat (limited to 'node/api.go')
-rw-r--r-- | node/api.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/node/api.go b/node/api.go index f199a8d3d..9b2be9c2e 100644 --- a/node/api.go +++ b/node/api.go @@ -68,7 +68,11 @@ func (api *PrivateAdminAPI) StartRPC(host *string, port *rpc.HexNumber, cors *st } if host == nil { - host = &api.node.httpHost + h := common.DefaultHTTPHost + if api.node.httpHost != "" { + h = api.node.httpHost + } + host = &h } if port == nil { port = rpc.NewHexNumber(api.node.httpPort) @@ -113,7 +117,11 @@ func (api *PrivateAdminAPI) StartWS(host *string, port *rpc.HexNumber, allowedOr } if host == nil { - host = &api.node.wsHost + h := common.DefaultWSHost + if api.node.wsHost != "" { + h = api.node.wsHost + } + host = &h } if port == nil { port = rpc.NewHexNumber(api.node.wsPort) |