From 9cd8d1f9f3218af409e6606320c5a6eb037e8ff1 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 12 Aug 2021 09:48:54 +0100 Subject: [PATCH] sspc: enable CCEs on proxy link wsi Normally we suppress CCEs while still in the client connection loop time, since we can return failure directly to the caller. In sspc client case, defeat that, in order to have a convenient place to put code that cares about ongoing proxy link connection failures. --- lib/secure-streams/secure-streams-client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/secure-streams/secure-streams-client.c b/lib/secure-streams/secure-streams-client.c index 157413ea2..e90cf79cd 100644 --- a/lib/secure-streams/secure-streams-client.c +++ b/lib/secure-streams/secure-streams-client.c @@ -215,8 +215,15 @@ callback_sspc_client(struct lws *wsi, enum lws_callback_reasons reason, case LWS_CALLBACK_PROTOCOL_DESTROY: break; + case LWS_CALLBACK_CONNECTING: + /* + * In our particular case, we want CCEs even inside the + * initial connect loop time + */ + wsi->client_suppress_CONNECTION_ERROR = 0; + break; + case LWS_CALLBACK_CLIENT_CONNECTION_ERROR: - lwsl_wsi_warn(wsi, "CONNECTION_ERROR"); #if defined(LWS_WITH_SYS_METRICS) /* * If any hanging caliper measurement, dump it, and free any tags