[Libwebsockets] [libwebsockets] #106: Two callbacks for one write request

Trac trac at libwebsockets.org
Mon Mar 30 12:40:26 CEST 2015


#106: Two callbacks for one write request
-----------------------------------+-----------------
 Reporter:  stephang               |      Owner:
     Type:  defect                 |     Status:  new
 Priority:  minor                  |  Milestone:
Component:  libwebsockets library  |    Version:
 Keywords:                         |
-----------------------------------+-----------------
 Hi,

 we are using libwebsockets in a Windows project and encountered the
 following issue in our server implementation:

 Sometimes I get two write callbacks (LWS_CALLBACK_SERVER_WRITEABLE) for a
 single write request (libwebsocket_callback_on_writable_all_protocol) and
 I am wondering why.
 Is there anything I am doing wrong?
 The server has exactly one client connection.
 The second callback comes with the same parameters as the first one (same
 context, wsi, etc.).

 Notes:
 When using poll timeout 0 in the libwebsocket_service call it is more
 likely that both callbacks are fired.
 It usually happens for the first write call after a client connection is
 established.

--
Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/106>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list