This commit is contained in:
crusader 2017-11-23 18:28:18 +09:00
parent 38a19148d1
commit af7b7c14bd

View File

@ -110,28 +110,28 @@ func newClientCodecResponseOrNotify(r io.Reader, encoder encode.Encoder) (protoc
ccrn := retainClientCodecResponseOrNotify() ccrn := retainClientCodecResponseOrNotify()
// if notify, err := newClientCodecNotify(raw); nil != err { if notify, err := newClientCodecNotify(raw); nil != err {
// res, err := newClientCodecResponse(raw) res, err := newClientCodecResponse(raw)
// if nil != err {
// releaseClientCodecResponseOrNotify(ccrn)
// return nil, fmt.Errorf("Is not response or notification [%v]", raw)
// }
// ccrn.response = res
// } else {
// ccrn.notify = notify
// }
if res, err := newClientCodecResponse(raw); nil != err {
notify, err := newClientCodecNotify(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
} }