summaryrefslogtreecommitdiff
path: root/src/pkg/rpc/client.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-03 16:54:30 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-03 16:54:30 +0200
commit28592ee1ea1f5cdffcf85472f9de0285d928cf12 (patch)
tree32944e18b23f7fe4a0818a694aa2a6dfb1835463 /src/pkg/rpc/client.go
parente836bee4716dc0d4d913537ad3ad1925a7ac32d0 (diff)
downloadgolang-upstream/59.tar.gz
Imported Upstream version 59upstream/59
Diffstat (limited to 'src/pkg/rpc/client.go')
-rw-r--r--src/pkg/rpc/client.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/rpc/client.go b/src/pkg/rpc/client.go
index a8e560cbe..b1828614f 100644
--- a/src/pkg/rpc/client.go
+++ b/src/pkg/rpc/client.go
@@ -23,7 +23,7 @@ func (e ServerError) String() string {
return string(e)
}
-const ErrShutdown = os.ErrorString("connection is shut down")
+var ErrShutdown = os.NewError("connection is shut down")
// Call represents an active RPC.
type Call struct {
@@ -110,7 +110,7 @@ func (client *Client) input() {
if response.Error == "" {
err = client.codec.ReadResponseBody(c.Reply)
if err != nil {
- c.Error = os.ErrorString("reading body " + err.String())
+ c.Error = os.NewError("reading body " + err.String())
}
} else {
// We've got an error response. Give this to the request;
@@ -119,7 +119,7 @@ func (client *Client) input() {
c.Error = ServerError(response.Error)
err = client.codec.ReadResponseBody(nil)
if err != nil {
- err = os.ErrorString("reading error body: " + err.String())
+ err = os.NewError("reading error body: " + err.String())
}
}
c.done()
@@ -221,7 +221,7 @@ func DialHTTPPath(network, address, path string) (*Client, os.Error) {
return NewClient(conn), nil
}
if err == nil {
- err = os.ErrorString("unexpected HTTP response: " + resp.Status)
+ err = os.NewError("unexpected HTTP response: " + resp.Status)
}
conn.Close()
return nil, &net.OpError{"dial-http", network + " " + address, nil, err}