/* 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 */
* run into the connection timeout or win
*/
- lwsl_err("SSL connect error %s\n",
+ lwsl_err("SSL connect error %lu: %s\n",
+ ERR_get_error(),
ERR_error_string(ERR_get_error(),
(char *)context->service_buffer));
return 0;
}
/* allocate the per-connection user memory (if any) */
- if (wsi->protocol->per_session_data_size &&
- !libwebsocket_ensure_user_space(wsi)) {
+ if (libwebsocket_ensure_user_space(wsi)) {
lwsl_err("Problem allocating wsi user mem\n");
goto bail2;
}