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
ff2b1eab36
commit
0222cd25b0
1 changed files with 2 additions and 0 deletions
|
@ -2162,6 +2162,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