Skip to content

The connection timeout duration configured for WebSocket is not taking effect. #173

@JamesLebron

Description

@JamesLebron

Dear author,

Hello.

Recently, we have observed that the timeout duration for connecting to the WebSocket seems not to align with the expected configuration results. Below are some brief logs.

LOG_DEBUG << "connect websokect -connectionTimeout = " << m_stack_config.connectionTimeout().count()
              << " -retryInterval = " << m_stack_config.retryInterval().count()
              << " -webSocketPingInterval = " << m_ocpp_config.webSocketPingInterval().count();
    m_reconnect_scheduled = false;
    return m_rpc_client->start(connection_url,
                               iface,
                               credentials,
                               m_stack_config.connectionTimeout(),
                               m_stack_config.retryInterval(),
                               m_ocpp_config.webSocketPingInterval());



[ DEBUG ] - [2024-01-12 18:59:42.405] - ChargePoint.cpp:1228 - connect websokect -connectionTimeout = 180000 -retryInterval = 1000 -webSocketPingInterval = 10
[2024/01/12 18:59:42:4690] N: lws_create_context: LWS: 4.3.2-a1c9db4, NET CLI SRV H1 H2 WS ConMon IPv6-absent
[2024/01/12 18:59:42:4723] N: __lws_lc_tag:  ++ [wsi|0|pipe] (1)
[2024/01/12 18:59:42:5365] N: __lws_lc_tag:  ++ [vh|0|default|eth1|eth1|-1] (1)
[2024/01/12 18:59:44:6463] N: __lws_lc_tag:  ++ [wsicli|0|WS/h1/default/192.168.10.10] (1)
[ ERROR ] - [2024-01-12 19:00:04.468] - ChargePoint.cpp:933 - Connection failed with Central System
[ INFO  ] - [2024-01-12 19:00:04.517] - ChargePoint.cpp:942 - Last registration status was accepted, offline actions are allowed7
[2024/01/12 19:00:04:6147] N: __lws_lc_untag:  -- [wsicli|0|WS/h1/default/192.168.10.10] (0) 20.702s
[2024/01/12 19:00:06:5030] N: __lws_lc_tag:  ++ [wsicli|1|WS/h1/default/192.168.10.10] (1)
[2024/01/12 19:00:26:5121] N: __lws_lc_untag:  -- [wsicli|1|WS/h1/default/192.168.10.10] (0) 20.009s
[2024/01/12 19:00:27:6334] N: __lws_lc_tag:  ++ [wsicli|2|WS/h1/default/192.168.10.10] (1)
[2024/01/12 19:00:47:6367] N: __lws_lc_untag:  -- [wsicli|2|WS/h1/default/192.168.10.10] (0) 20.003s
[2024/01/12 19:00:48:7002] N: __lws_lc_tag:  ++ [wsicli|3|WS/h1/default/192.168.10.10] (1)
[2024/01/12 19:01:08:7188] N: __lws_lc_untag:  -- [wsicli|3|WS/h1/default/192.168.10.10] (0) 20.018s
[2024/01/12 19:01:09:8496] N: __lws_lc_tag:  ++ [wsicli|4|WS/h1/default/192.168.10.10] (1)
[2024/01/12 19:01:29:8662] N: __lws_lc_untag:  -- [wsicli|4|WS/h1/default/192.168.10.10] (0) 20.016s
[2024/01/12 19:01:31:0347] N: __lws_lc_tag:  ++ [wsicli|5|WS/h1/default/192.168.10.10] (1)

Additionally, we have consulted the libwebsockets API and found a parameter named connect_timeout_secs. We attempted to replace timeout_secs with connect_timeout_secs. However, after conducting actual tests, we found that the timeout duration still does not meet our expected time.

Could you please provide some guidance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions