@@ -69,7 +69,7 @@ lws_client_happy_eyeballs_cb(lws_sorted_usec_list_t *sul)
6969 struct lws * wsi = lws_container_of (sul , struct lws ,
7070 sul_happy_eyeballs );
7171
72- lwsl_wsi_info (wsi , "happy eyeballs timer fired, initiating parallel connect" );
72+ lwsl_wsi_notice (wsi , "happy eyeballs timer fired, initiating parallel connect" );
7373 lws_client_connect_3_connect (wsi , NULL , NULL , 0 , NULL );
7474}
7575
@@ -578,6 +578,7 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
578578 }
579579 lws_sul_cancel (& wsi -> sul_happy_eyeballs );
580580 if (pidx != -1 ) {
581+ lwsl_wsi_notice (wsi , "racing connect %d won, promoting" , pidx );
581582 /*
582583 * A racing connect won. The primary
583584 * socket is still open and still in the
@@ -640,7 +641,7 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
640641 lws_snprintf (dcce , sizeof (dcce ), "conn fail: %s" ,
641642 lws_errno_describe (real_errno , t16 , sizeof (t16 )));
642643 cce = dcce ;
643- lwsl_wsi_debug (wsi , "%s" , dcce );
644+ lwsl_wsi_notice (wsi , "%s" , dcce );
644645 lws_metrics_caliper_report (wsi -> cal_conn , METRES_NOGO );
645646
646647 if (pidx != -1 ) {
@@ -674,6 +675,7 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
674675 * kernel recycles the fd
675676 * numbers.
676677 */
678+ lwsl_wsi_notice (wsi , "primary failed, promoting parallel racer %d" , m );
677679 if (wsi -> a .context -> event_loop_ops -> promote_parallel )
678680 wsi -> a .context -> event_loop_ops -> promote_parallel (wsi , m );
679681 promote_parallel_fd (wsi , m );
@@ -1081,7 +1083,8 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
10811083 char buf [64 ];
10821084
10831085 lws_sa46_write_numeric_address ((lws_sockaddr46 * )psa , buf , sizeof (buf ));
1084- lwsl_wsi_info (wsi , "trying %s" , buf );
1086+ lwsl_wsi_notice (wsi , "trying %s%s" , buf ,
1087+ is_parallel ? " (parallel racer)" : "" );
10851088 }
10861089
10871090#if defined(LWS_WITH_SYS_FAULT_INJECTION )
@@ -1180,6 +1183,8 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
11801183 }
11811184#endif
11821185#endif
1186+ if (is_parallel )
1187+ lwsl_wsi_notice (wsi , "parallel racer failed connect() synchronously" );
11831188 goto try_next_dns_result_fds ;
11841189 }
11851190
@@ -1311,6 +1316,7 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
13111316
13121317 if (is_parallel ) {
13131318 /* promote parallel to primary right away */
1319+ lwsl_wsi_notice (wsi , "parallel racer %d connected synchronously, promoting" , pidx );
13141320 wsi -> parallel_conns [pidx ].position_in_fds_table = wsi -> position_in_fds_table ;
13151321 wsi -> position_in_fds_table = saved_pos ;
13161322 wsi -> desc = saved_fd ;
@@ -1412,7 +1418,7 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
14121418 wsi -> a .protocol -> callback (wsi , LWS_CALLBACK_WSI_CREATE ,
14131419 wsi -> user_space , NULL , 0 );
14141420
1415- lwsl_wsi_debug (wsi , "going into connect_4" );
1421+ lwsl_wsi_notice (wsi , "going into connect_4" );
14161422
14171423 return lws_client_connect_4_established (wsi , NULL , plen );
14181424
@@ -1518,6 +1524,7 @@ lws_client_connect_3_connect(struct lws *wsi, const char *ads,
15181524 }
15191525 if (any_valid ) {
15201526 /* some connection is still running */
1527+ lwsl_wsi_notice (wsi , "attempt failed, others still running" );
15211528 return wsi ;
15221529 }
15231530 }
0 commit comments