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

lws_get_peer_write_allowance: cope with no role callback for it

https://github.com/warmcat/libwebsockets/issues/1339
This commit is contained in:
Andy Green 2018-07-17 18:29:25 +08:00
parent b3cf069733
commit 264583fe7d

View file

@ -2123,6 +2123,8 @@ lws_partial_buffered(struct lws *wsi)
LWS_VISIBLE lws_fileofs_t
lws_get_peer_write_allowance(struct lws *wsi)
{
if (!wsi->role_ops->tx_credit)
return -1;
return wsi->role_ops->tx_credit(wsi);
}