[Libwebsockets] Returning -1 from client callback has no effect (LWS_CALLBACK_CLOSED isn't invoked)

Andy Green andy at warmcat.com
Thu Mar 13 15:01:41 CET 2014



On 13 March 2014 17:47:49 GMT+08:00, bjorka adinov <adinov.bjorka at gmail.com> wrote:
>Hello Andy,
>
>I'm using libwebsockets 1.23. On server side whenever I return -1 from
>the
>callback, the connection is closed and LWS_CALLBACK_CLOSED is invoked
>on
>both side. But when  I return -1 from client side callback, nothing
>happened. LWS_CALLBACK_CLOSED is not invoked. When I debug the code, it
>seems the callback function is called from function
>libwebsocket_client_rx_sm (client-parser.c) line 396 and the return
>value
>from the callback function is not used ? Is this by design ? Am I
>missing
>something ?

It's probably simply missing the code to take care of it, the server code gets a lot more attention.

Patch is welcome or if you can wait until Saturday I will take a look at it.

-Andy

>Thanks a lot
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list