mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
smp: set tsi in fakewsi used with WAIT_CANCELLED
Together with the new lws_wsi_tsi(wsi) this lets the WAIT_CANCELLED callback understand its tsi context, the broadcasts are done for each pt / loop.
This commit is contained in:
parent
9df59987ae
commit
398a2cd46c
1 changed files with 3 additions and 1 deletions
|
@ -610,8 +610,10 @@ lws_broadcast(struct lws_context_per_thread *pt, int reason, void *in, size_t le
|
|||
lws_fakewsi_def_plwsa(pt);
|
||||
int n, ret = 0;
|
||||
|
||||
|
||||
lws_fakewsi_prep_plwsa_ctx(pt->context);
|
||||
#if !defined(LWS_PLAT_FREERTOS) && LWS_MAX_SMP > 1
|
||||
((struct lws *)plwsa)->tsi = (int)(pt - &pt->context->pt[0]);
|
||||
#endif
|
||||
|
||||
while (v) {
|
||||
const struct lws_protocols *p = v->protocols;
|
||||
|
|
Loading…
Add table
Reference in a new issue