[Libwebsockets] puzzled by partial writes

Michael Haberler mail17 at mah.priv.at
Sat May 24 10:38:01 CEST 2014


Am 24.05.2014 um 09:54 schrieb Michael Haberler <andy.green at linaro.org>:

> I'm stuck on an error on partial writes which I dont understand

stop the presses. The problem was with a logging function which is not threadsafe, but was used by multiple threads (syslog-async).

-Michael


> 
> I use no_buffer_all_partial_tx = 0 so the library handles partial writes for me - libwebsocket_write() gives no indication it could'nt write all of the buffer, but then I run into this:
> 
> 
> May 24 09:25:22 msgd:0: ---- Websocket write 19/19
> May 24 09:25:22 msgd:0: ---- Websocket write 171/171
> May 24 09:25:22 msgd:0: ---- Websocket write 19/19
> May 24 09:25:22 msgd:0: ---- Websocket write 171/171
> May 24 09:25:22 msgd:0: ***** b5115468 new partial sent 0 from 21 total
> May 24 09:25:22 msgd:0: ---- Websocket write 19/19
> May 24 09:25:22 msgd:0: ****** b5115468 Sending new, pending truncated ...
> /home/mah/src/libwebsockets-warmcat/lib/output.c:112: lws_issue_raw: Assertion `0' failed.
> 
> does this ring a bell? a code smell?
> 
> thanks in advance,
> 
> Michael
> 
> ps: I dont exclude I made some error, or a stray pointer damages something
> 
> 
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list