@@ -144,7 +144,7 @@ void LibWebsocketClientPool::process()
144144
145145 // Dummy vhost to handle context related events
146146 struct lws_protocols protocols[] = {{" LibWebsocketClientPool" , &LibWebsocketClientPool::eventCallback, 0 , 0 , 0 , this , 0 },
147- LWS_PROTOCOL_LIST_TERM};
147+ LWS_PROTOCOL_LIST_TERM};
148148 struct lws_context_creation_info vhost_info;
149149 memset (&vhost_info, 0 , sizeof (vhost_info));
150150 vhost_info.protocols = protocols;
@@ -443,11 +443,12 @@ void LibWebsocketClientPool::Client::connectCallback(struct lws_sorted_usec_list
443443 // Fill vhost information
444444 struct lws_context_creation_info vhost_info;
445445 memset (&vhost_info, 0 , sizeof (vhost_info));
446- vhost_info.options = LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
447- vhost_info.port = CONTEXT_PORT_NO_LISTEN;
448- vhost_info.timeout_secs = client->m_connect_timeout ;
449- vhost_info.protocols = protocols;
450- vhost_info.log_cx = &pool->m_logs_context ;
446+ vhost_info.options = LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
447+ vhost_info.port = CONTEXT_PORT_NO_LISTEN;
448+ vhost_info.timeout_secs = client->m_connect_timeout ;
449+ vhost_info.connect_timeout_secs = client->m_connect_timeout ;
450+ vhost_info.protocols = protocols;
451+ vhost_info.log_cx = &pool->m_logs_context ;
451452 if (client->m_url .protocol () == " wss" )
452453 {
453454 if (!client->m_credentials .tls12_cipher_list .empty ())
@@ -686,6 +687,12 @@ int LibWebsocketClientPool::Client::eventCallback(
686687 {
687688 retry = true ;
688689 }
690+
691+ SendMsg* msg;
692+ while (client->m_send_msgs .pop (msg, 0 ))
693+ {
694+ delete msg;
695+ }
689696 break ;
690697
691698 default :
0 commit comments