[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
>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.


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

More information about the Libwebsockets mailing list