File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ int picoquic_ns_server_callback(picoquic_cnx_t* cnx,
143143 for (int i = 0 ; i < cc_ctx -> nb_connections ; i ++ ) {
144144 if (cc_ctx -> client_ctx [i ] != NULL && cc_ctx -> client_ctx [i ]-> cnx != NULL &&
145145 picoquic_compare_connection_id (& cnx -> path [0 ]-> first_tuple -> p_remote_cnxid -> cnx_id ,
146- & cc_ctx -> client_ctx [i ]-> cnx -> path [0 ]-> first_tuple -> p_remote_cnxid -> cnx_id ) == 0 ) {
146+ & cc_ctx -> client_ctx [i ]-> cnx -> path [0 ]-> first_tuple -> p_local_cnxid -> cnx_id ) == 0 ) {
147147 picoquic_set_congestion_algorithm_ex (cnx , cc_ctx -> client_ctx [i ]-> cc_algo , cc_ctx -> client_ctx [i ]-> cc_option_string );
148148 ret = 0 ;
149149 }
@@ -840,6 +840,14 @@ int picoquic_ns(picoquic_ns_spec_t* spec)
840840 }
841841 }
842842
843+ if (ret == 0 &&
844+ (cc_ctx -> client_ctx [0 ]-> cnx == NULL ||
845+ (cc_ctx -> client_ctx [0 ]-> cnx -> cnx_state == picoquic_state_disconnected &&
846+ (cc_ctx -> client_ctx [0 ]-> cnx -> local_error != 0 ||
847+ cc_ctx -> client_ctx [0 ]-> cnx -> remote_error != 0 )))) {
848+ ret = -1 ;
849+ }
850+
843851 /* TODO: check the completion. Should it be done there or inside each test? */
844852 if (ret == 0 && cc_ctx -> simulated_time > spec -> main_target_time ) {
845853 ret = -1 ;
You can’t perform that action at this time.
0 commit comments