diff options
-rw-r--r-- | nanohttp/nanohttp-ssl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nanohttp/nanohttp-ssl.c b/nanohttp/nanohttp-ssl.c index 8921585..c2f578b 100644 --- a/nanohttp/nanohttp-ssl.c +++ b/nanohttp/nanohttp-ssl.c @@ -45,6 +45,7 @@ typedef unsigned int uint32_t; #include "nanohttp-ssl.h" #include "nanohttp-common.h" +#include "nanohttp-socket.h" #ifdef WIN32 @@ -309,7 +310,11 @@ SSL* init_ssl(SSL_CTX* ctx, int sock, int type) SSL_set_fd(ssl, sock); if(type == SSL_SERVER) { + hsocket_t sock_t; + sock_t.sock = sock; + hsocket_block(sock_t, 1); ret = SSL_accept(ssl); + hsocket_block(sock_t, 0); if(ret <= 0) { log_error1( "SSL accept error"); log_ssl_error(ssl, ret); |