From a3fd5a0fd6d659ef1c01f2cd60e59700912ac4f4 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Thu, 2 Oct 2014 03:42:17 -0700 Subject: [PATCH] /rpcaddr should be storing a multiaddr client expects a multiaddr. server was writing a bsaddr --- daemon/daemon.go | 7 ++++++- daemon/daemon_client.go | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index 76dfa06a060d..d3499ca130a9 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -63,7 +63,12 @@ func NewDaemonListener(ipfsnode *core.IpfsNode, addr *ma.Multiaddr, confdir stri return nil, err } - _, err = ofi.Write([]byte(host)) + mstr, err := addr.String() + if err != nil { + return nil, err + } + + _, err = ofi.Write([]byte(mstr)) if err != nil { log.Warning("Could not write to rpcaddress file: %s", err) return nil, err diff --git a/daemon/daemon_client.go b/daemon/daemon_client.go index 5ca0e3a37975..6d69fb0620da 100644 --- a/daemon/daemon_client.go +++ b/daemon/daemon_client.go @@ -67,6 +67,7 @@ func SendCommand(command *Command, confdir string) error { return err } + log.Info("Daemon address: %s", server) maddr, err := ma.NewMultiaddr(server) if err != nil { return err