Skip to content

Commit bb8e228

Browse files
committed
add logging
1 parent 0615ab0 commit bb8e228

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Smdn.Net.MuninNode/Smdn.Net.MuninNode/NodeBase.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,15 @@ public async ValueTask AcceptAsync(
151151
CancellationToken cancellationToken
152152
)
153153
{
154+
Logger?.LogInformation("starting to accept");
155+
154156
try {
155157
for (; ; ) {
156158
if (cancellationToken.IsCancellationRequested) {
157159
if (throwIfCancellationRequested)
158160
cancellationToken.ThrowIfCancellationRequested();
159161
else
160-
return;
162+
break;
161163
}
162164

163165
await AcceptSingleSessionAsync(cancellationToken).ConfigureAwait(false);
@@ -166,9 +168,9 @@ CancellationToken cancellationToken
166168
catch (OperationCanceledException ex) {
167169
if (throwIfCancellationRequested || ex.CancellationToken != cancellationToken)
168170
throw;
169-
170-
return;
171171
}
172+
173+
Logger?.LogInformation("stopped to accept");
172174
}
173175

174176
/// <summary>

0 commit comments

Comments
 (0)