File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/OneBeyond.Studio.EmailProviders.Smtp Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 4444 --logger "trx;logfileprefix=tr"
4545
4646 - name : " Publish Solution Test Results"
47- uses : actions/upload-artifact@v3
47+ uses : actions/upload-artifact@v4
4848 if : success() || failure()
4949 with :
5050 name : " test-results"
Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ public void Dispose()
114114 exception ,
115115 "Unable to send message via SmptClient {SmtpClientId}. Disconnecting the client before releasing it" ,
116116 smtpClient . Id ) ;
117- await smtpClient . Value . DisconnectAsync ( true , cancellationToken ) . ConfigureAwait ( false ) ;
118117
119118 throw new EmailSenderException ( "Unable to send message via SmptClient { SmtpClientId }.Disconnecting the client before releasing it." , exception ) ;
120119 }
@@ -173,12 +172,13 @@ private async Task ReleaseSmtpClientAsync(
173172 ( int Id , MailKit . Net . Smtp . SmtpClient Value ) smtpClient ,
174173 CancellationToken cancellationToken )
175174 {
175+ await smtpClient . Value . DisconnectAsync ( true , cancellationToken ) . ConfigureAwait ( false ) ;
176+
176177 // Only SmtpClients created before threshold are returned into the queue for later re-use,
177178 // all the others get decommissioned. Another option that SmtpClient gets returned regardless its id
178179 // provided the queue count is less than the threshold.
179180 if ( smtpClient . Id > SmtpClientsMaxCount )
180181 {
181- await smtpClient . Value . DisconnectAsync ( true , cancellationToken ) . ConfigureAwait ( false ) ;
182182 smtpClient . Value . Dispose ( ) ;
183183 }
184184 else
You can’t perform that action at this time.
0 commit comments