distinguish error from truncation
Signed-off-by: Christian Wyss <christian.wyss@gfk.com>
This commit is contained in:
parent
8d5793bc16
commit
8ff88e9df0
1 changed files with 1 additions and 1 deletions
|
@ -592,7 +592,7 @@ callback_lws_mirror(struct libwebsocket_context *context,
|
|||
LWS_SEND_BUFFER_PRE_PADDING,
|
||||
ringbuffer[pss->ringbuffer_tail].len,
|
||||
LWS_WRITE_TEXT);
|
||||
if (n < ringbuffer[pss->ringbuffer_tail].len) {
|
||||
if (n < 0) {
|
||||
lwsl_err("ERROR %d writing to mirror socket\n", n);
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue