[Libwebsockets] [libwebsockets] #42: calculates number of actually sent bytes incorrectly in libwebsockets_write

Trac trac at libwebsockets.org
Fri Oct 18 12:39:08 CEST 2013


#42: calculates number of actually sent bytes incorrectly in libwebsockets_write
-------------------------------------+-----------------
  Reporter:  andreaspakulat          |      Owner:
      Type:  defect                  |     Status:  new
  Priority:  major                   |  Milestone:
 Component:  libwebsocket test apps  |    Version:
Resolution:                          |   Keywords:
-------------------------------------+-----------------

Comment (by agreen):

 Replying to [comment:9 andreaspakulat]:
 > Ugh, I'm terribly sorry. Turns out that this was my own fault. I
 initialized the wrong field of the protocol to the wanted buffer size.
 After moving that to the right place sending a few dozen KB of data (but
 less than the rx_buffer_size) work just fine.

 Ah I appreciate the update.  I thought it was strange it could be
 reproduced so readily on a similar Linux box when it took me a long while
 to see it even before SO_SNDBUF was added.

 However I have completed an (untested) patch to handle these conditions
 and will push it shortly.  If this code never gets triggered, then no
 problem ^^ if it does then we can make sure it works as intended... either
 way it's no worse than what we have today.

--
Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/42#comment:10>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list