@@ -81,8 +81,11 @@ static void s_tester_on_server_connection_shutdown(
81
81
(void )connection ;
82
82
(void )error_code ;
83
83
struct tester * tester = user_data ;
84
+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
84
85
85
86
tester -> server_connection_is_shutdown = true;
87
+
88
+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
86
89
aws_condition_variable_notify_one (& tester -> wait_cvar );
87
90
}
88
91
@@ -94,6 +97,7 @@ static void s_tester_on_server_connection_setup(
94
97
95
98
(void )server ;
96
99
struct tester * tester = user_data ;
100
+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
97
101
98
102
if (error_code ) {
99
103
tester -> wait_result = error_code ;
@@ -113,6 +117,7 @@ static void s_tester_on_server_connection_setup(
113
117
114
118
tester -> server_connection = connection ;
115
119
done :
120
+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
116
121
aws_condition_variable_notify_one (& tester -> wait_cvar );
117
122
}
118
123
@@ -122,13 +127,16 @@ static void s_tester_on_client_connection_setup(
122
127
void * user_data ) {
123
128
124
129
struct tester * tester = user_data ;
130
+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
131
+
125
132
if (error_code ) {
126
133
tester -> wait_result = error_code ;
127
134
goto done ;
128
135
}
129
136
130
137
tester -> client_connection = connection ;
131
138
done :
139
+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
132
140
aws_condition_variable_notify_one (& tester -> wait_cvar );
133
141
}
134
142
@@ -140,8 +148,11 @@ static void s_tester_on_client_connection_shutdown(
140
148
(void )connection ;
141
149
(void )error_code ;
142
150
struct tester * tester = user_data ;
151
+ AWS_FATAL_ASSERT (aws_mutex_lock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
143
152
144
153
tester -> client_connection_is_shutdown = true;
154
+
155
+ AWS_FATAL_ASSERT (aws_mutex_unlock (& tester -> wait_lock ) == AWS_OP_SUCCESS );
145
156
aws_condition_variable_notify_one (& tester -> wait_cvar );
146
157
}
147
158
0 commit comments