fix: call of Unmarshal passed a non-pointer as second argument

This commit is contained in:
Philipp Mieden 2019-05-21 10:06:21 +02:00
parent dd902fe717
commit 82733d4b25

View File

@ -109,8 +109,10 @@ func (c *socketTransport) call(handler server.Handler, request interface{}, resp
responseJSONErr := json.Unmarshal(responseBytes, &serverResponse{Reply: response})
if responseJSONErr != nil {
// is it an error ?
remoteErr := responses.Error{}
remoteErrJSONErr := json.Unmarshal(responseBytes, remoteErr)
var (
remoteErr = responses.Error{}
remoteErrJSONErr = json.Unmarshal(responseBytes, &remoteErr)
)
if remoteErrJSONErr == nil {
returnConn(remoteErrJSONErr)
return remoteErr