onion
onion copied to clipboard
Wrong return value of 'onion_websocket_write'
Hello Mr Moreno,
the function 'onion_websocket_write' does not return the correct length information in all cases. If the internal writing is split in multiple parts, only the length of the last token is propagated.
https://github.com/davidmoreno/onion/blob/2b3b230b79ecae119b7eb847f2f9545a46bef13c/src/onion/websocket.c#L238
Fix:
return (ret + (*lpwriter) (ws->req, tout, len & 1023));
Regards Olaf Schulz