aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/rpc/jsonrpc
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/rpc/jsonrpc')
-rw-r--r--libgo/go/rpc/jsonrpc/client.go2
-rw-r--r--libgo/go/rpc/jsonrpc/server.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/rpc/jsonrpc/client.go b/libgo/go/rpc/jsonrpc/client.go
index 577d0ce..17e9b93 100644
--- a/libgo/go/rpc/jsonrpc/client.go
+++ b/libgo/go/rpc/jsonrpc/client.go
@@ -79,7 +79,7 @@ func (c *clientCodec) ReadResponseHeader(r *rpc.Response) os.Error {
c.mutex.Lock()
r.ServiceMethod = c.pending[c.resp.Id]
- c.pending[c.resp.Id] = "", false
+ delete(c.pending, c.resp.Id)
c.mutex.Unlock()
r.Error = ""
diff --git a/libgo/go/rpc/jsonrpc/server.go b/libgo/go/rpc/jsonrpc/server.go
index 9801fdf..61b5abf 100644
--- a/libgo/go/rpc/jsonrpc/server.go
+++ b/libgo/go/rpc/jsonrpc/server.go
@@ -107,7 +107,7 @@ func (c *serverCodec) WriteResponse(r *rpc.Response, x interface{}) os.Error {
c.mutex.Unlock()
return os.NewError("invalid sequence number in response")
}
- c.pending[r.Seq] = nil, false
+ delete(c.pending, r.Seq)
c.mutex.Unlock()
if b == nil {