|
1 | 1 | // This file contains session pooling algorithms adapted from Npgsql |
2 | 2 | // Original source: https://github.com/npgsql/npgsql |
3 | | -// Copyright (c) 2002-2023, Npgsql |
4 | | -// |
5 | | -// Permission to use, copy, modify, and distribute this software and its |
6 | | -// documentation for any purpose, without fee, and without a written agreement |
7 | | -// is hereby granted, provided that the above copyright notice and this |
8 | | -// paragraph and the following two paragraphs appear in all copies. |
9 | | -// |
10 | | -// IN NO EVENT SHALL NPGSQL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, |
11 | | -// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, |
12 | | -// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF |
13 | | -// NPGSQL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
14 | | -// |
15 | | -// NPGSQL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
16 | | -// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
17 | | -// THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND NPGSQL HAS NO |
18 | | -// OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR |
19 | | -// MODIFICATIONS. |
20 | | -// |
21 | | -// Adapted for YDB .NET SDK with modifications for IPoolingSession interface |
22 | | -// and YDB-specific session management requirements. |
| 3 | +// Copyright (c) 2002-2025, Npgsql |
| 4 | +// Licence https://github.com/npgsql/npgsql?tab=PostgreSQL-1-ov-file |
23 | 5 |
|
24 | 6 | using System.Diagnostics.CodeAnalysis; |
25 | 7 | using System.Runtime.CompilerServices; |
@@ -111,6 +93,7 @@ private async ValueTask<IPoolingSession> RentAsync(CancellationToken cancellatio |
111 | 93 | { |
112 | 94 | ctsGetSession.CancelAfter(TimeSpan.FromSeconds(_createSessionTimeout)); |
113 | 95 | } |
| 96 | + |
114 | 97 | var finalToken = ctsGetSession.Token; |
115 | 98 |
|
116 | 99 | try |
@@ -299,7 +282,6 @@ private static void PruneIdleSessions(object? state) |
299 | 282 |
|
300 | 283 | if (pool._logger.IsEnabled(LogLevel.Debug)) |
301 | 284 | { |
302 | | - |
303 | 285 | } |
304 | 286 |
|
305 | 287 | while (toPrune > 0 && |
|
0 commit comments