File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,20 @@ void SSLConnection::readCallback()
68
68
readLength = _readBuffer.writableBytes ();
69
69
rd = SSL_read (_sslPtr.get (), _readBuffer.beginWrite (), readLength);
70
70
LOG_TRACE << " ssl read:" << rd << " bytes" ;
71
- int sslerr = SSL_get_error (_sslPtr.get (), rd);
72
- if (rd <= 0 && sslerr != SSL_ERROR_WANT_READ)
71
+ if (rd <= 0 )
73
72
{
74
- LOG_TRACE << " ssl read err:" << sslerr;
75
- _status = SSLStatus::DisConnected;
76
- handleClose ();
77
- return ;
73
+ int sslerr = SSL_get_error (_sslPtr.get (), rd);
74
+ if (sslerr == SSL_ERROR_WANT_READ)
75
+ {
76
+ break ;
77
+ }
78
+ else
79
+ {
80
+ LOG_TRACE << " ssl read err:" << sslerr;
81
+ _status = SSLStatus::DisConnected;
82
+ handleClose ();
83
+ return ;
84
+ }
78
85
}
79
86
if (rd > 0 )
80
87
{
You can’t perform that action at this time.
0 commit comments