1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

force ssl rw bios nonblocking

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-01-28 17:45:34 +08:00
parent ba85a7dbbd
commit 1167dd4a6e

View file

@ -143,6 +143,7 @@ int lws_server_socket_service(struct libwebsocket_context *context,
int m;
int opt = 1;
ssize_t len;
BIO *bio;
switch (wsi->mode) {
@ -281,6 +282,17 @@ int lws_server_socket_service(struct libwebsocket_context *context,
SSL_set_fd(new_wsi->ssl, accept_fd);
bio = SSL_get_rbio(new_wsi->ssl);
if (bio)
BIO_set_nbio(bio, 1); /* nonblocking */
else
lwsl_notice("NULL rbio\n");
bio = SSL_get_wbio(new_wsi->ssl);
if (bio)
BIO_set_nbio(bio, 1); /* nonblocking */
else
lwsl_notice("NULL rbio\n");
/*
* we are not accepted yet, but we need to enter ourselves
* as a live connection. That way we can retry when more