diff options
-rw-r--r-- | cmd/mist/main.go | 4 | ||||
-rw-r--r-- | cmd/utils/websockets.go | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cmd/mist/main.go b/cmd/mist/main.go index eaf0af0c7..5f809f1c5 100644 --- a/cmd/mist/main.go +++ b/cmd/mist/main.go @@ -69,6 +69,10 @@ func run() error { utils.StartRpc(ethereum, RpcPort) } + if StartWebSockets { + utils.StartWebSockets(ethereum) + } + gui := NewWindow(ethereum, config, clientIdentity, KeyRing, LogLevel) gui.stdLog = stdLog diff --git a/cmd/utils/websockets.go b/cmd/utils/websockets.go index d3ba50e78..cf9ebba92 100644 --- a/cmd/utils/websockets.go +++ b/cmd/utils/websockets.go @@ -3,10 +3,13 @@ package utils import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/websocket" "github.com/ethereum/go-ethereum/xeth" ) +var wslogger = logger.NewLogger("WS") + func args(v ...interface{}) []interface{} { return v } @@ -106,6 +109,8 @@ func (self *WebSocketServer) Serv() { } func StartWebSockets(eth *eth.Ethereum) { + wslogger.Infoln("Starting WebSockets") + sock := NewWebSocketServer(eth) go sock.Serv() } |