diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-20 03:46:01 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-08-20 03:46:01 +0800 |
commit | 269c5c71072f9e17e6387f853d626bff1160db5c (patch) | |
tree | 3a4b1cca074e10495fa1b8f5611a40ad1fba69e8 /rpc | |
parent | 382d35bf403ab5dd9b0d2fe3a87c3960902d6e57 (diff) | |
download | dexon-269c5c71072f9e17e6387f853d626bff1160db5c.tar dexon-269c5c71072f9e17e6387f853d626bff1160db5c.tar.gz dexon-269c5c71072f9e17e6387f853d626bff1160db5c.tar.bz2 dexon-269c5c71072f9e17e6387f853d626bff1160db5c.tar.lz dexon-269c5c71072f9e17e6387f853d626bff1160db5c.tar.xz dexon-269c5c71072f9e17e6387f853d626bff1160db5c.tar.zst dexon-269c5c71072f9e17e6387f853d626bff1160db5c.zip |
Revert "fdtrack: temporary hack for tracking file descriptor usage"
This reverts commit 5c949d3b3ba81ea0563575b19a7b148aeac4bf61.
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/comms/http.go | 2 | ||||
-rw-r--r-- | rpc/comms/ipc_unix.go | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/rpc/comms/http.go b/rpc/comms/http.go index c08b744a1..c165aa27e 100644 --- a/rpc/comms/http.go +++ b/rpc/comms/http.go @@ -29,7 +29,6 @@ import ( "io" "io/ioutil" - "github.com/ethereum/go-ethereum/fdtrack" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rpc/codec" @@ -178,7 +177,6 @@ func listenHTTP(addr string, h http.Handler) (*stopServer, error) { if err != nil { return nil, err } - l = fdtrack.WrapListener("rpc", l) s := &stopServer{l: l, idle: make(map[net.Conn]struct{})} s.Server = &http.Server{ Addr: addr, diff --git a/rpc/comms/ipc_unix.go b/rpc/comms/ipc_unix.go index 6968fa844..24aefa5f3 100644 --- a/rpc/comms/ipc_unix.go +++ b/rpc/comms/ipc_unix.go @@ -22,7 +22,6 @@ import ( "net" "os" - "github.com/ethereum/go-ethereum/fdtrack" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/rpc/codec" @@ -51,16 +50,15 @@ func (self *ipcClient) reconnect() error { func startIpc(cfg IpcConfig, codec codec.Codec, initializer func(conn net.Conn) (shared.EthereumApi, error)) error { os.Remove(cfg.Endpoint) // in case it still exists from a previous run - l, err := net.Listen("unix", cfg.Endpoint) + l, err := net.ListenUnix("unix", &net.UnixAddr{Name: cfg.Endpoint, Net: "unix"}) if err != nil { return err } - l = fdtrack.WrapListener("ipc", l) os.Chmod(cfg.Endpoint, 0600) go func() { for { - conn, err := l.Accept() + conn, err := l.AcceptUnix() if err != nil { glog.V(logger.Error).Infof("Error accepting ipc connection - %v\n", err) continue |