@@ -81,8 +81,11 @@ static void s_tester_on_server_connection_shutdown(
8181 (void )connection ;
8282 (void )error_code ;
8383 struct tester * tester = user_data ;
84+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
8485
8586 tester -> server_connection_is_shutdown = true;
87+
88+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
8689 aws_condition_variable_notify_one (& tester -> wait_cvar );
8790}
8891
@@ -94,6 +97,7 @@ static void s_tester_on_server_connection_setup(
9497
9598 (void )server ;
9699 struct tester * tester = user_data ;
100+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
97101
98102 if (error_code ) {
99103 tester -> wait_result = error_code ;
@@ -113,6 +117,7 @@ static void s_tester_on_server_connection_setup(
113117
114118 tester -> server_connection = connection ;
115119done :
120+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
116121 aws_condition_variable_notify_one (& tester -> wait_cvar );
117122}
118123
@@ -122,13 +127,16 @@ static void s_tester_on_client_connection_setup(
122127 void * user_data ) {
123128
124129 struct tester * tester = user_data ;
130+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
131+
125132 if (error_code ) {
126133 tester -> wait_result = error_code ;
127134 goto done ;
128135 }
129136
130137 tester -> client_connection = connection ;
131138done :
139+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
132140 aws_condition_variable_notify_one (& tester -> wait_cvar );
133141}
134142
@@ -140,8 +148,11 @@ static void s_tester_on_client_connection_shutdown(
140148 (void )connection ;
141149 (void )error_code ;
142150 struct tester * tester = user_data ;
151+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
143152
144153 tester -> client_connection_is_shutdown = true;
154+
155+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
145156 aws_condition_variable_notify_one (& tester -> wait_cvar );
146157}
147158
0 commit comments