Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
tutorial test passes
Browse files Browse the repository at this point in the history
  • Loading branch information
wfarner committed Dec 3, 2016
1 parent 621ba35 commit b933ec1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/rpc/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net"
"net/http"
"net/http/httputil"
"sync"
)

type client struct {
Expand All @@ -21,7 +22,7 @@ func New(socketPath string, api spi.APISpec) Client {
}

unvalidatedClient := &client{http: http.Client{Transport: &http.Transport{Dial: dialUnix}}}
return &handshakingClient{client: unvalidatedClient, api: api}
return &handshakingClient{client: unvalidatedClient, api: api, lock: &sync.Mutex{}}
}

func (c client) Call(method string, arg interface{}, result interface{}) error {
Expand All @@ -30,7 +31,7 @@ func (c client) Call(method string, arg interface{}, result interface{}) error {
return err
}

req, err := http.NewRequest("POST", "http:///", bytes.NewReader(message))
req, err := http.NewRequest("POST", "http://a/", bytes.NewReader(message))
if err != nil {
return err
}
Expand Down

0 comments on commit b933ec1

Please sign in to comment.