[Libwebsockets] [libwebsockets] #89: Possible bug with client closing socket

Trac trac at libwebsockets.org
Thu Oct 16 02:03:01 CEST 2014


#89: Possible bug with client closing socket
------------------------------------+-----------------
  Reporter:  panyam                 |      Owner:
      Type:  defect                 |     Status:  new
  Priority:  major                  |  Milestone:
 Component:  libwebsockets library  |    Version:  1.0
Resolution:                         |   Keywords:
------------------------------------+-----------------

Comment (by agreen):

 First I think the problem is real enough and something needs doing about
 it.

 It makes sense the remote server connections has more restrictions in how
 much the OS can buffer, and triggers the partial write stuff rather than
 the local connection that keeps clearing out the pipe.  And then it's
 difficult to reproduce.  But the busywait is real I think.

 About your 'fix', well it avoids the symptom by basically abandoning the
 wait to flush the buffer.

 And using a flag, the peer may not know what has happened and the state of
 the connection can change in the meanwhile.

 There's an lws connection state DEAD_SOCKET that's supposed to protect
 against this kind of thing I'll have a quick look at the code.

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



More information about the Libwebsockets mailing list