zchuango commented on code in PR #3409:
URL: https://github.com/apache/brpc/pull/3409#discussion_r3735816738
##########
src/brpc/policy/http_rpc_protocol.h:
##########
@@ -87,11 +87,20 @@ class HttpContext : public ReadableProgressiveAttachment
, public InputMessageBase
, public HttpMessage {
public:
+ SocketId GetSocketId() override {
+ return _socket_id;
+ }
+
+ void SetSocketId(SocketId id) {
+ _socket_id = id;
+ }
+
explicit HttpContext(bool read_body_progressively,
HttpMethod request_method = HTTP_METHOD_GET)
: InputMessageBase()
, HttpMessage(read_body_progressively, request_method)
- , _is_stage2(false) {
+ , _is_stage2(false)
+ , _socket_id(0) {
// add one ref for Destroy
Review Comment:
Fixed. HttpContext::_socket_id is now initialized to INVALID_SOCKET_ID, so
an unset socket ID cannot be mistaken for a valid one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]