diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-23 22:44:03 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-23 22:44:03 +0800 |
commit | 6b5532ab0d0e88f27af539840c58cbd6de13de90 (patch) | |
tree | 84f1856e1b3fb2fd927e6ef9c59983e4fb347a8c /rpc/comms/ipc_windows.go | |
parent | 139439dcdc14e448bfdbd509bb135faa92337a28 (diff) | |
parent | 2b3957f3737b56622e38425a52caea2a836f8b63 (diff) | |
download | dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.tar dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.tar.gz dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.tar.bz2 dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.tar.lz dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.tar.xz dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.tar.zst dexon-6b5532ab0d0e88f27af539840c58cbd6de13de90.zip |
Merge pull request #1279 from bas-vk/rpc-http
Integrate console and remove old rpc package structure
Diffstat (limited to 'rpc/comms/ipc_windows.go')
-rw-r--r-- | rpc/comms/ipc_windows.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/rpc/comms/ipc_windows.go b/rpc/comms/ipc_windows.go index c48dfb7fb..44c82ef8a 100644 --- a/rpc/comms/ipc_windows.go +++ b/rpc/comms/ipc_windows.go @@ -14,7 +14,6 @@ import ( "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" - "github.com/ethereum/go-ethereum/rpc/api" "github.com/ethereum/go-ethereum/rpc/codec" "github.com/ethereum/go-ethereum/rpc/shared" ) @@ -641,10 +640,18 @@ func newIpcClient(cfg IpcConfig, codec codec.Codec) (*ipcClient, error) { return nil, err } - return &ipcClient{codec.New(c)}, nil + return &ipcClient{cfg.Endpoint, codec, codec.New(c)}, nil } -func startIpc(cfg IpcConfig, codec codec.Codec, api api.EthereumApi) error { +func (self *ipcClient) reconnect() error { + c, err := Dial(self.endpoint) + if err == nil { + self.coder = self.codec.New(c) + } + return err +} + +func startIpc(cfg IpcConfig, codec codec.Codec, api shared.EthereumApi) error { os.Remove(cfg.Endpoint) // in case it still exists from a previous run l, err := Listen(cfg.Endpoint) |