Skip to content

Commit b9e2012

Browse files
dev: LogLevel Warn -> Debug on AttachStream has been cancelled (#443)
1 parent 7cd2d37 commit b9e2012

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Ydb.Sdk/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- dev: LogLevel `Warning` -> `Debug` on AttachStream has been cancelled.
2+
13
## v0.18.0
24

35
- Disable Discovery mode: skip discovery step and client balancing and use connection to start endpoint ([#420](https://github.com/ydb-platform/ydb-dotnet-sdk/issues/420)).

src/Ydb.Sdk/src/Services/Query/SessionPool.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ protected override async Task<Session> CreateSession()
9797
}
9898
catch (Driver.TransportException e)
9999
{
100+
if (e.Status.StatusCode == StatusCode.Cancelled)
101+
{
102+
Logger.LogDebug("AttachStream is cancelled (possible grpcChannel is closing)");
103+
104+
return;
105+
}
106+
100107
Logger.LogWarning(e, "Session[{SessionId}] is deactivated by transport error", sessionId);
101108
}
102109
}

0 commit comments

Comments
 (0)