[feat] Response Close 的时候需要 return error

This commit is contained in:
what 2023-06-02 14:14:07 +08:00
parent a30b34e137
commit 5f50e424be

View File

@ -43,12 +43,12 @@ func (this Response) Send(data string) error {
} }
// 取消接收数据 // 取消接收数据
func (this Response) Close() { func (this Response) Close() error {
this.recv.Close()
if this.method.IsServerStreaming() { if this.method.IsServerStreaming() {
this.cancel() this.cancel()
} }
return this.recv.Close()
} }
func (this Response) GetCategory() string { func (this Response) GetCategory() string {