chenBright commented on code in PR #3693:
URL: https://github.com/apache/brpc/pull/3693#discussion_r4425633610


##########
src/brpc/socket.h:
##########
@@ -317,7 +318,7 @@ struct SocketOptions {
 
     // Socket keepalive related options.
     // Refer to `SocketKeepaliveOptions' for details.
-    std::shared_ptr<SocketKeepaliveOptions> keepalive_options;
+    butil::optional<SocketKeepaliveOptions> keepalive_options;

Review Comment:
   Socket and SocketOptions are intended for internal use, so this source- and 
ABI-breaking change is acceptable. Using butil::optional gives each socket its 
own keepalive configuration and prevents filling defaults from mutating shared 
state.



-- 
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]

Reply via email to