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:
parent
b3cf069733
commit
264583fe7d
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue