diff options
author | bas-vk <bas-vk@users.noreply.github.com> | 2016-07-25 16:07:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-25 16:07:05 +0800 |
commit | 771655e3fee585ce4bc47dfaa279557c6c1c2421 (patch) | |
tree | 9071e157a54c40f06f0e5895643c82ca9a0b037a /rpc/ipc_unix.go | |
parent | 60cd5bf9397bd8331bce3bb1884524d43c31dbb5 (diff) | |
parent | 91b769042857f542b2792b23ec407e1c9bd4fe8d (diff) | |
download | go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.tar go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.tar.gz go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.tar.bz2 go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.tar.lz go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.tar.xz go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.tar.zst go-tangerine-771655e3fee585ce4bc47dfaa279557c6c1c2421.zip |
Merge pull request #2808 from fjl/rpc-client-3
rpc: add new client, use it everywhere
Diffstat (limited to 'rpc/ipc_unix.go')
-rw-r--r-- | rpc/ipc_unix.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rpc/ipc_unix.go b/rpc/ipc_unix.go index 9ece01240..a25b21627 100644 --- a/rpc/ipc_unix.go +++ b/rpc/ipc_unix.go @@ -22,6 +22,8 @@ import ( "net" "os" "path/filepath" + + "golang.org/x/net/context" ) // ipcListen will create a Unix socket on the given endpoint. @@ -40,6 +42,6 @@ func ipcListen(endpoint string) (net.Listener, error) { } // newIPCConnection will connect to a Unix socket on the given endpoint. -func newIPCConnection(endpoint string) (net.Conn, error) { - return net.DialUnix("unix", nil, &net.UnixAddr{Name: endpoint, Net: "unix"}) +func newIPCConnection(ctx context.Context, endpoint string) (net.Conn, error) { + return dialContext(ctx, "unix", endpoint) } |