@@ -164,7 +164,7 @@ internal async Task<AutorecoveringConnection> CreateAutorecoveringConnectionWith
164164 return ( AutorecoveringConnection ) conn ;
165165 }
166166
167- protected Task CloseConnectionAsync ( IConnection conn )
167+ protected static Task CloseConnectionAsync ( IConnection conn )
168168 {
169169 return Util . CloseConnectionAsync ( conn ) ;
170170 }
@@ -178,15 +178,15 @@ internal async Task CloseAndWaitForRecoveryAsync(AutorecoveringConnection conn)
178178 {
179179 TaskCompletionSource < bool > sl = PrepareForShutdown ( conn ) ;
180180 TaskCompletionSource < bool > rl = PrepareForRecovery ( conn ) ;
181- await CloseConnectionAsync ( conn ) ;
181+ await TestConnectionRecoveryBase . CloseConnectionAsync ( conn ) ;
182182 await WaitAsync ( sl , "connection shutdown" ) ;
183183 await WaitAsync ( rl , "connection recovery" ) ;
184184 }
185185
186186 internal async Task CloseAndWaitForShutdownAsync ( AutorecoveringConnection conn )
187187 {
188188 TaskCompletionSource < bool > sl = PrepareForShutdown ( conn ) ;
189- await CloseConnectionAsync ( conn ) ;
189+ await TestConnectionRecoveryBase . CloseConnectionAsync ( conn ) ;
190190 await WaitAsync ( sl , "connection shutdown" ) ;
191191 }
192192
@@ -208,7 +208,7 @@ protected async Task PublishMessagesWhileClosingConnAsync(QueueName queueName)
208208 {
209209 if ( i == CloseAtCount )
210210 {
211- await CloseConnectionAsync ( _conn ) ;
211+ await TestConnectionRecoveryBase . CloseConnectionAsync ( _conn ) ;
212212 }
213213
214214 await publishingChannel . BasicPublishAsync ( ExchangeName . Empty , ( RoutingKey ) queueName , _messageBody ) ;
@@ -217,6 +217,8 @@ protected async Task PublishMessagesWhileClosingConnAsync(QueueName queueName)
217217
218218 await publishingChannel . CloseAsync ( ) ;
219219 }
220+
221+ await publishingConn . CloseAsync ( ) ;
220222 }
221223 }
222224
0 commit comments