Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions node/rpcstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ func (h *httpServer) start() error {
h.listener = listener
go h.server.Serve(listener)

// if server is websocket only, return after logging
if h.wsAllowed() && !h.rpcAllowed() {
if h.wsAllowed() {
url := fmt.Sprintf("ws://%v", listener.Addr())
if h.wsConfig.prefix != "" {
url += h.wsConfig.prefix
}
h.log.Info("WebSocket enabled", "url", url)
}
// if server is websocket only, return after logging
if !h.rpcAllowed() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. Is there ever a case where neither ws nor rpc is allowed, but we still want to not exit here? I think the answer is no, but .... graphql..? cc @renaynay

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphql cannot be allowed if rpc is disabled

return nil
}
// Log http endpoint.
Expand Down