[Libwebsockets] Crash when client browser refresh the page while connection is open

Andy Green andy at warmcat.com
Wed Aug 20 06:23:39 CEST 2014



On 20 August 2014 12:16:57 GMT+08:00, Sazali Hisham <sazalihisham at gmail.com> wrote:
>Hi Andy,
>
>I am facing a strange behaviour. libwebsocket->service crashed when the
>client browser who is connected,refresh the page. The close callback
>triggered but then libwebsocket->service call crashed. However, it is
>working just fine if the client directly close the browser, or closing
>the
>connection via javascript.

I guess the only clue will be how and where it crashed.

So think about running it under gdb or another debugger and let us know the backtrace.

-Andy

>The way I use libwebsocket is by wrapping it in a class which left only
>the
>callbacks in the main program. Also I just use simple infinite loop in
>my
>main() that calls libwebsocket->service. I created a getter function in
>the
>class that returns libwebsocket context to be used in the service
>function.
>
>Am a newbie. I really appreciate your advices.
>
>Thanks!
>
>Sazali
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list