FS-5325 i'll put the nonblocking in but I still think this is a problem with openssl, a short read is not there every single time you connect, When the lib is in full blocking mode it should be handling the complicated actions internally. As complicated as socket programming is, async ssl is even worse because it requires you to do your own buffering and attemps to read may fail waiting for you to write or vice-versa which should have been handled for us in the lib. non-interruptable syscalls are getting pretty outdated and not enabling it is much less complex than making every socket app on earth be non-blocking

This commit is contained in:
Anthony Minessale 2013-05-09 12:56:42 -05:00
parent f00bd136ac
commit 79230a5d8a
1 changed files with 2 additions and 2 deletions

View File

@ -239,8 +239,8 @@ handshake (struct stream_data *data)
if( SSL_set_fd(data->ssl, (int)(intptr_t)data->sock) != 1 ) return IKS_NOMEM;
/* Set both the read and write BIO's to non-blocking mode */
//BIO_set_nbio(SSL_get_rbio(data->ssl), 1);
//BIO_set_nbio(SSL_get_wbio(data->ssl), 1);
BIO_set_nbio(SSL_get_rbio(data->ssl), 1);
BIO_set_nbio(SSL_get_wbio(data->ssl), 1);
finished = 0;