diff --git a/lib/client.c b/lib/client.c index 576c7ff1..e3d3da3e 100644 --- a/lib/client.c +++ b/lib/client.c @@ -101,7 +101,7 @@ int lws_client_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_CLEAR_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLOUT); + wsi->user_space, (void *)(long)wsi->sock, POLLOUT); /* we can retry this... just cook the SSL BIO the first time */ diff --git a/lib/server.c b/lib/server.c index edbcc978..44e62225 100644 --- a/lib/server.c +++ b/lib/server.c @@ -328,7 +328,7 @@ int lws_server_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_CLEAR_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLOUT); + wsi->user_space, (void *)(long)wsi->sock, POLLOUT); lws_latency_pre(context, wsi); n = SSL_accept(wsi->ssl); @@ -347,7 +347,8 @@ int lws_server_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_SET_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLIN); + wsi->user_space, + (void *)(long)wsi->sock, POLLIN); lwsl_info("SSL_ERROR_WANT_READ\n"); break; } @@ -358,7 +359,8 @@ int lws_server_socket_service(struct libwebsocket_context *context, /* external POLL support via protocol 0 */ context->protocols[0].callback(context, wsi, LWS_CALLBACK_SET_MODE_POLL_FD, - (void *)(long)wsi->sock, NULL, POLLOUT); + wsi->user_space, + (void *)(long)wsi->sock, POLLOUT); break; } lwsl_debug("SSL_accept failed skt %u: %s\n",