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

bjorka adinov adinov.bjorka at gmail.com
Fri Mar 14 07:00:12 CET 2014


I'm afraid if I do the patching I will mess the code up, so I hope you
spare some time to look at it, and I appreciate it.

Thank you


On Thu, Mar 13, 2014 at 9:01 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140314/6c715bc0/attachment-0001.html>


More information about the Libwebsockets mailing list