From 79230a5d8a053dc903589a6c21a46ec3e6f2e25c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 9 May 2013 12:56:42 -0500 Subject: [PATCH] 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 --- libs/iksemel/src/stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/iksemel/src/stream.c b/libs/iksemel/src/stream.c index 850b9ba259..5be98363f8 100644 --- a/libs/iksemel/src/stream.c +++ b/libs/iksemel/src/stream.c @@ -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;