@@ -164,7 +164,7 @@ internal async Task<AutorecoveringConnection> CreateAutorecoveringConnectionWith
164
164
return ( AutorecoveringConnection ) conn ;
165
165
}
166
166
167
- protected Task CloseConnectionAsync ( IConnection conn )
167
+ protected static Task CloseConnectionAsync ( IConnection conn )
168
168
{
169
169
return Util . CloseConnectionAsync ( conn ) ;
170
170
}
@@ -178,15 +178,15 @@ internal async Task CloseAndWaitForRecoveryAsync(AutorecoveringConnection conn)
178
178
{
179
179
TaskCompletionSource < bool > sl = PrepareForShutdown ( conn ) ;
180
180
TaskCompletionSource < bool > rl = PrepareForRecovery ( conn ) ;
181
- await CloseConnectionAsync ( conn ) ;
181
+ await TestConnectionRecoveryBase . CloseConnectionAsync ( conn ) ;
182
182
await WaitAsync ( sl , "connection shutdown" ) ;
183
183
await WaitAsync ( rl , "connection recovery" ) ;
184
184
}
185
185
186
186
internal async Task CloseAndWaitForShutdownAsync ( AutorecoveringConnection conn )
187
187
{
188
188
TaskCompletionSource < bool > sl = PrepareForShutdown ( conn ) ;
189
- await CloseConnectionAsync ( conn ) ;
189
+ await TestConnectionRecoveryBase . CloseConnectionAsync ( conn ) ;
190
190
await WaitAsync ( sl , "connection shutdown" ) ;
191
191
}
192
192
@@ -208,7 +208,7 @@ protected async Task PublishMessagesWhileClosingConnAsync(QueueName queueName)
208
208
{
209
209
if ( i == CloseAtCount )
210
210
{
211
- await CloseConnectionAsync ( _conn ) ;
211
+ await TestConnectionRecoveryBase . CloseConnectionAsync ( _conn ) ;
212
212
}
213
213
214
214
await publishingChannel . BasicPublishAsync ( ExchangeName . Empty , ( RoutingKey ) queueName , _messageBody ) ;
@@ -217,6 +217,8 @@ protected async Task PublishMessagesWhileClosingConnAsync(QueueName queueName)
217
217
218
218
await publishingChannel . CloseAsync ( ) ;
219
219
}
220
+
221
+ await publishingConn . CloseAsync ( ) ;
220
222
}
221
223
}
222
224
0 commit comments