[Libwebsockets] Returning wrong protocol number when initialising the context

Gilles Printemps gprintemps at gmail.com
Mon Nov 18 15:07:52 CET 2019


You're right and it was one of my problem during several days.
Without the terminator, sometimes it was working (mainly in debug mode) but
each time I wanted to execute it in release mode (with -O2 option), I had
some strange behaviours and even segmentation faults...
Now, with the terminator, everything seems better...

Without the terminator:
[2019/11/18 15:05:19:5417] I: Initial logging level 8
[2019/11/18 15:05:19:5418] I: Libwebsockets version: 3.2.0 v3.2.0
[2019/11/18 15:05:19:5419] I: IPV6 not compiled in
[2019/11/18 15:05:19:5419] I:  LWS_DEF_HEADER_LEN    : 4096
[2019/11/18 15:05:19:5419] I:  LWS_MAX_PROTOCOLS     : 5
[2019/11/18 15:05:19:5419] I:  LWS_MAX_SMP           : 1
[2019/11/18 15:05:19:5419] I:  sizeof (*info)        : 648
[2019/11/18 15:05:19:5419] I:  SYSTEM_RANDOM_FILEPATH: '/dev/urandom'
[2019/11/18 15:05:19:5419] I:  HTTP2 support         : available
[2019/11/18 15:05:19:5419] I: context created
[2019/11/18 15:05:19:5420] I: Using event loop: poll
[2019/11/18 15:05:19:5420] I: Default ALPN advertisment: h2,http/1.1
[2019/11/18 15:05:19:5420] I:  default timeout (secs): 20
[2019/11/18 15:05:19:5420] I:  Threads: 1 each 1024 fds
[2019/11/18 15:05:19:5421] I:  mem: context:          5144 B (1048 ctx + (1
thr x 4096))
[2019/11/18 15:05:19:5421] I:  mem: http hdr size:   (4096 + 976), max
count 1024
[2019/11/18 15:05:19:5421] I:  mem: pollfd map:       8192 B
[2019/11/18 15:05:19:5421] I:  mem: platform fd map:  8192 B
[2019/11/18 15:05:19:5422] I:  Compiled with OpenSSL support
[2019/11/18 15:05:19:5423] I:  SSL disabled: no
LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT
[2019/11/18 15:05:19:5424] I: *Creating Vhost 'default' port 9000, 2
protocols, IPv6 off*

*Sometimes, I also got 5 protocols as in my initial post!!*

With the terminator:
[2019/11/18 15:04:02:2406] I: Initial logging level 8
[2019/11/18 15:04:02:2406] I: Libwebsockets version: 3.2.0 v3.2.0
[2019/11/18 15:04:02:2406] I: IPV6 not compiled in
[2019/11/18 15:04:02:2406] I:  LWS_DEF_HEADER_LEN    : 4096
[2019/11/18 15:04:02:2406] I:  LWS_MAX_PROTOCOLS     : 5
[2019/11/18 15:04:02:2407] I:  LWS_MAX_SMP           : 1
[2019/11/18 15:04:02:2407] I:  sizeof (*info)        : 648
[2019/11/18 15:04:02:2407] I:  SYSTEM_RANDOM_FILEPATH: '/dev/urandom'
[2019/11/18 15:04:02:2407] I:  HTTP2 support         : available
[2019/11/18 15:04:02:2407] I: context created
[2019/11/18 15:04:02:2407] I: Using event loop: poll
[2019/11/18 15:04:02:2407] I: Default ALPN advertisment: h2,http/1.1
[2019/11/18 15:04:02:2407] I:  default timeout (secs): 20
[2019/11/18 15:04:02:2407] I:  Threads: 1 each 1024 fds
[2019/11/18 15:04:02:2407] I:  mem: context:          5144 B (1048 ctx + (1
thr x 4096))
[2019/11/18 15:04:02:2407] I:  mem: http hdr size:   (4096 + 976), max
count 1024
[2019/11/18 15:04:02:2407] I:  mem: pollfd map:       8192 B
[2019/11/18 15:04:02:2408] I:  mem: platform fd map:  8192 B
[2019/11/18 15:04:02:2408] I:  Compiled with OpenSSL support
[2019/11/18 15:04:02:2408] I:  SSL disabled: no
LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT
[2019/11/18 15:04:02:2408] I:* Creating Vhost 'default' port 9000, 1
protocols, IPv6 off*

On Mon, Nov 18, 2019 at 2:34 PM Andy Green <andy at warmcat.com> wrote:

>
>
> On 11/18/19 1:00 PM, Gilles Printemps wrote:
>
> > [2019/11/18 10:55:02:1783] I: Creating Vhost 'default' port 9000, 1
> > protocols, IPv6 off
>
> It just seems to say 1 protocol?
>
> -Andy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20191118/d0de2fd5/attachment.htm>


More information about the Libwebsockets mailing list