rpc/lib/types: RPCResponse.Result is not a pointer

This commit is contained in:
Ethan Buchman
2017-11-08 00:25:36 +00:00
parent a01c226dc4
commit 593c127257
5 changed files with 16 additions and 17 deletions

View File

@ -46,7 +46,7 @@ func (h *myHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.mtx.RUnlock()
res := json.RawMessage(`{}`)
emptyRespBytes, _ := json.Marshal(types.RPCResponse{Result: &res})
emptyRespBytes, _ := json.Marshal(types.RPCResponse{Result: res})
if err := conn.WriteMessage(messageType, emptyRespBytes); err != nil {
return
}
@ -204,7 +204,7 @@ func callWgDoneOnResult(t *testing.T, c *WSClient, wg *sync.WaitGroup) {
if resp.Error != nil {
t.Fatalf("unexpected error: %v", resp.Error)
}
if *resp.Result != nil {
if resp.Result != nil {
wg.Done()
}
case <-c.Quit: