diff --git a/lib/core-net/private-lib-core-net.h b/lib/core-net/private-lib-core-net.h index b75e023ea..1f566178b 100644 --- a/lib/core-net/private-lib-core-net.h +++ b/lib/core-net/private-lib-core-net.h @@ -1117,8 +1117,8 @@ lws_rxflow_cache(struct lws *wsi, unsigned char *buf, size_t n, size_t len); int lws_service_flag_pending(struct lws_context *context, int tsi); -static LWS_INLINE int -lws_has_buffered_out(struct lws *wsi) { return !!wsi->buflist_out; } +int +lws_has_buffered_out(struct lws *wsi); int LWS_WARN_UNUSED_RESULT lws_ws_client_rx_sm(struct lws *wsi, unsigned char c); diff --git a/lib/core-net/wsi.c b/lib/core-net/wsi.c index 84c6723e6..7a0ffeaed 100644 --- a/lib/core-net/wsi.c +++ b/lib/core-net/wsi.c @@ -622,6 +622,24 @@ lws_get_ssl(struct lws *wsi) } #endif +int +lws_has_buffered_out(struct lws *wsi) +{ + if (wsi->buflist_out) + return 1; + +#if defined(LWS_ROLE_H2) + { + struct lws *nwsi = lws_get_network_wsi(wsi); + + if (nwsi->buflist_out) + return 1; + } +#endif + + return 0; +} + int lws_partial_buffered(struct lws *wsi) {