https://github.com/warmcat/libwebsockets/issues/461
Signed-off-by: Andy Green <andy.green@linaro.org>
/* Priority 6: user can get the callback
*/
m = lws_ext_cb_active(wsi, LWS_EXT_CB_IS_WRITEABLE, NULL, 0);
+ if (m)
+ return -1;
#ifndef LWS_NO_EXTENSIONS
if (!wsi->extension_data_pending)
goto user_service;
/* wait for all the service threads to exit */
- for (n = 0; n < lws_get_count_threads(context); n++)
+ while ((--n) >= 0)
pthread_join(pthread_service[n], &retval);
/* wait for pthread_dumb to exit */