chenBright commented on PR #1814:
URL: https://github.com/apache/incubator-brpc/pull/1814#issuecomment-1186746706

   > > > @chenBright 这个问题能不能通过在判断ssl_state和_ssl_session基础上解决呢?比如在DoWrite里
   > > > ```
   > > > current_ssl_session = _ssl_session
   > > > if (current_ssl_session == NULL) {
   > > >    // necessary comment
   > > >    return -1;
   > > > }
   > > > ...
   > > > butil::IOBuf::cut_multiple_into_SSL_channel(current_ssl_session, ...)
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > 这样保证current_ssl_session不是NULL,不出core,然后写fd的时候发现对端已经关了连接就走正常错误处理的代码了。
   > > 
   > > 
   > > @zyearn 
这样可以保证不会coredump,这也是正常的边界处理逻辑。当时有考虑通过判断_ssl_session或者fd来解决,但是觉得并没有实际解决问题。现在是HealthCheckTask里的引用不符合预期,导致了Socket内部的状态错误的问题,这样处理的话,会不会不太合适呢?
   > 
   > Sorry看到晚了,加了一条comment,麻烦看下。总体我觉得没有什么问题,在增加代码的地方加点注释解释为什么这么做就好了。
   
   已修改


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