Skip to content

Commit

Permalink
feat: decouple attachments for request & response
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnights committed Apr 30, 2019
1 parent ed0095d commit cec371b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.weibo.api.motan.util.LoggerUtil;

import java.lang.reflect.Method;
import java.util.HashMap;

/**
* @author maijunsheng
Expand Down Expand Up @@ -104,7 +105,7 @@ public Response invoke(Request request) {
}
// 传递rpc版本和attachment信息方便不同rpc版本的codec使用。
response.setRpcProtocolVersion(request.getRpcProtocolVersion());
response.setAttachments(request.getAttachments());
response.setAttachments(new HashMap<>(request.getAttachments()));
return response;
}
}

0 comments on commit cec371b

Please # to comment.