From 4f15515a83280455f10d60e96a9bcf11f47100a1 Mon Sep 17 00:00:00 2001 From: crusader Date: Wed, 29 Nov 2017 01:31:09 +0900 Subject: [PATCH] ing --- protocol/json/server_request.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/json/server_request.go b/protocol/json/server_request.go index db9d221..ed294d4 100644 --- a/protocol/json/server_request.go +++ b/protocol/json/server_request.go @@ -167,7 +167,7 @@ func (src *ServerRequestCodec) WriteError(w io.Writer, status int, err error) er func (src *ServerRequestCodec) writeServerResponse(w io.Writer, res *serverResponse) error { // ID is null for notifications and they don't have a response. - if req.ID != nil { + if res.ID != nil { encoder := json.NewEncoder(src.codec.Encode(w)) // Not sure in which case will this happen. But seems harmless. if err := encoder.Encode(res); nil != err {