ing
This commit is contained in:
parent
f60a2f912a
commit
99e3263594
|
@ -110,17 +110,28 @@ func newClientCodecResponseOrNotify(r io.Reader, encoder encode.Encoder) (protoc
|
||||||
|
|
||||||
ccrn := retainClientCodecResponseOrNotify()
|
ccrn := retainClientCodecResponseOrNotify()
|
||||||
|
|
||||||
if res, err := newClientCodecResponse(raw); nil != err {
|
if notify, err := newClientCodecNotify(raw); nil != err {
|
||||||
notify, err := newClientCodecNotify(raw)
|
res, err := newClientCodecResponse(raw)
|
||||||
if nil != err {
|
if nil != err {
|
||||||
releaseClientCodecResponseOrNotify(ccrn)
|
releaseClientCodecResponseOrNotify(ccrn)
|
||||||
return nil, fmt.Errorf("Is not response or notification [%v]", raw)
|
return nil, fmt.Errorf("Is not response or notification [%v]", raw)
|
||||||
}
|
}
|
||||||
ccrn.notify = notify
|
|
||||||
} else {
|
|
||||||
ccrn.response = res
|
ccrn.response = res
|
||||||
|
} else {
|
||||||
|
ccrn.notify = notify
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if res, err := newClientCodecResponse(raw); nil != err {
|
||||||
|
// notify, err := newClientCodecNotify(raw)
|
||||||
|
// if nil != err {
|
||||||
|
// releaseClientCodecResponseOrNotify(ccrn)
|
||||||
|
// return nil, fmt.Errorf("Is not response or notification [%v]", raw)
|
||||||
|
// }
|
||||||
|
// ccrn.notify = notify
|
||||||
|
// } else {
|
||||||
|
// ccrn.response = res
|
||||||
|
// }
|
||||||
|
|
||||||
return ccrn, nil
|
return ccrn, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ func newClientCodecNotify(raw json.RawMessage) (protocol.ClientCodecNotify, erro
|
||||||
}
|
}
|
||||||
if "" == ccn.notify.Method {
|
if "" == ccn.notify.Method {
|
||||||
releaseClientCodecNotify(ccn)
|
releaseClientCodecNotify(ccn)
|
||||||
return nil, fmt.Errorf("This is not ClientNotify")
|
return nil, fmt.Errorf("This is not Client Notify")
|
||||||
}
|
}
|
||||||
|
|
||||||
if ccn.notify.Version != Version {
|
if ccn.notify.Version != Version {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user