forked from cerc-io/plugeth
node: always show websocket url in logs (#22307)
This commit is contained in:
parent
9ec32a9e7b
commit
b1835b3855
@ -144,13 +144,15 @@ func (h *httpServer) start() error {
|
|||||||
h.listener = listener
|
h.listener = listener
|
||||||
go h.server.Serve(listener)
|
go h.server.Serve(listener)
|
||||||
|
|
||||||
// if server is websocket only, return after logging
|
if h.wsAllowed() {
|
||||||
if h.wsAllowed() && !h.rpcAllowed() {
|
|
||||||
url := fmt.Sprintf("ws://%v", listener.Addr())
|
url := fmt.Sprintf("ws://%v", listener.Addr())
|
||||||
if h.wsConfig.prefix != "" {
|
if h.wsConfig.prefix != "" {
|
||||||
url += h.wsConfig.prefix
|
url += h.wsConfig.prefix
|
||||||
}
|
}
|
||||||
h.log.Info("WebSocket enabled", "url", url)
|
h.log.Info("WebSocket enabled", "url", url)
|
||||||
|
}
|
||||||
|
// if server is websocket only, return after logging
|
||||||
|
if !h.rpcAllowed() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Log http endpoint.
|
// Log http endpoint.
|
||||||
|
Loading…
Reference in New Issue
Block a user