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

raw-proxy: fix role bind flag

This commit is contained in:
Andy Green 2021-07-06 20:22:18 +01:00
parent 4bc8b1a4b9
commit ad3901d0fe
2 changed files with 6 additions and 0 deletions

View file

@ -156,6 +156,9 @@ lws_role_call_adoption_bind(struct lws *wsi, int type, const char *prot)
lwsl_err("%s: can't find role '%s'\n", __func__,
wsi->a.vhost->listen_accept_role);
if (!strcmp(wsi->a.vhost->listen_accept_role, "raw-proxy"))
type |= LWS_ADOPT_FLAG_RAW_PROXY;
if (role && lws_rops_fidx(role, LWS_ROPS_adoption_bind)) {
n = (lws_rops_func_fidx(role, LWS_ROPS_adoption_bind)).
adoption_bind(wsi, type, prot);

View file

@ -48,6 +48,9 @@ rops_handle_POLLIN_raw_proxy(struct lws_context_per_thread *pt, struct lws *wsi,
return LWS_HPI_RET_HANDLED;
}
if (lwsi_state(wsi) == LRS_WAITING_CONNECT)
goto try_pollout;
if ((pollfd->revents & pollfd->events & LWS_POLLIN) &&
/* any tunnel has to have been established... */
lwsi_state(wsi) != LRS_SSL_ACK_PENDING &&